How to allow remote connection to MySQL
|
|
This tutorial will show you how to allow remote login to MySQL server for specific user. By default MSQL servers allow connections only from localhost.
You have to login to ssh (Secure Shell) and have root privileges.
You have to do the following in after you login ssh.
-
%mysl_bin%\mysql -u aUSERNAME -p
USERNAME is the MySQL administrator user. You will have to provide the password fro that user.
Your shell prompt should now look like this:
-
mysql>
Run this command:
-
grant all privileges on *.* to USER@IP identified by "PASSWORD";
USER is the username that you would like to give permissions for remote login.
IP is the public IP address of your remote connection.
PASSWORD is the password you would like to use for this username.
You now must flush MySQL\\\”s privileges. Run this command:
-
FLUSH PRIVILEGES;
Run this command to exit MySQL:
-
exit;

You can do exactly the same action with phpmyadmin (my version is 3.3.3) on privilege menu.
Thank You very much :)
helped a lot thx
Thank You very much very useful!!!
awan m8 lastog
If you don’t have a static IP use % instead of IP, example:
GRANT ALL PRIVILEGES ON database.* TO user@”%.%.%.%”
identified by “password”;