Tuesday, March 18, 2008

How do I connect to my MySQL server remotely?

This will entirely depend upon the client that you are using to connect with. There are onlytwo things you will need to ensure work for proper functionality. First, you will need to findout if the client you are using supports connections over TCP/IP. Second, you will have toadd a host to your mysql user, to allow connections from the host you are using.

This can be done from within a mysql command prompt like so:

mysql> GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'myclientip' IDENTIFIED BY 'mypassword';

mysql> FLUSH PRIVILEGES;

No comments: