Networking, Programming and Graphics - Tutorials
ONLINEHOWTO.net Tutorials Category

How to allow remote connection to MySQL

Type: Code Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Level: Intermediate Networking, Programming and Graphics - Tutorials Networking, Programming and Graphics - Tutorials 
Networking, Programming and Graphics - Tutorials
Date: 2007-Mar-04
Networking, Programming and Graphics - Tutorials
Visited: 31515 times
Networking, Programming and Graphics - Tutorials
Rating: Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Published: Stephen Think

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;
Rate this tutorial:                    
Post Comment


    • posted on 2009-Jun-03 | 02:19:22 AM
      Good post, just don't forget to use ` ` to encapsulate user name and host
Related Tags:

remote

connection

mysql

db

vi

nt

ip

Need a specific tutorial? Do not hesitate and submit a request!
Your e-mail: