Web Hosting Talk







View Full Version : Remote MYSQL Access


esdjco
12-18-2002, 05:49 PM
How do I enable remote access to a MySQL database?

MarkIL
12-18-2002, 05:52 PM
If it's firewalled, then remove the block. Make sure you also enable TCP listening in my.cnf,

[mysqld]
port=3306


and drop the "--skip-networking" option when starting [safe_]mysqld.

Also, if you wish to allow any user to connect remotely:
run "mysql -uroot -pyour-mysql-root-pass -D mysql"
and execute: UPDATE user SET host='%';

esdjco
12-18-2002, 07:00 PM
I want to allow one user from an IP access to the database. How is this done?

MarkIL
12-18-2002, 07:05 PM
As noted above, connect to the DB as root.
Then,

UPDATE user SET host='IP-ADDRESS' WHERE User='USERNAME';