Two solutions for mysql remote connection failure and two solutions for mysql
--- Restore content start ---
(This is reprinted by others, because I think it is very useful. Every time I try to solve this problem by referring to the second method. No matter what you don't listen to, let's say thank you! Also, write it down for your convenience)
Mysql provides two remote access methods. For more information, see:
1. Comment out bind-address = 127.0.0.1 in the [mysqld] section of/etc/mysql/my. cnf.
2. log on to mysql using mysql-uroot-p and enable the remote access permission using the following methods:
Method 1: mysql> use mysql;
Mysql> update user set host = '%' where user = 'root ';
Mysql> flush rivileges;
Method 2: mysql> grant all privileges on *. * TO 'myuser' @ '%' identified by 'mypassword' with grant option;
Reproduced original address: http://www.jb51.net/article/35267.htm
--- Restore content end ---