The MySQL remote connection has 3 steps:
1. Grant permissions to the host for remote access:
1 GRANT all privileges the yourdatabasename.* to [email protected]'romote access IP' c6> 'password' with GRANT OPTION;
In order for our changes to take effect, we then enter the command:
Flush privileges;
2. Modify the MySQL my.cnf file on the original installation machine, the location of the file is in
/etc/mysql/
Path, modify the contents as follows:
Bind-address = Your own IP
Then, restart the MySQL service:
sudo /etc/init.d/mysql start
The results are as follows:
3. Remote Login
1 3306 -D DATABASENAME
Results of successful operation:
Note: Here the username, password is the 1th step in the authorization of the user name, user password;
IP is also the IP of the Telnet machine, and also the IP of the MySQL installed machine;
P must be capitalized, the following 3306 is the default port number of MySQL, according to their own circumstances appropriate fill;
D in-D must also be capitalized, followed by the name of the database authorized in the 1th step.
===================================================================
Some time back to the error:
Sudo/etc/init.d/mysql start
can be solved.
MySQL Remote connection