Mainly 5.7 of many operations and the previous version is not the same, so tread a lot of pits.
1. remote connection cant connect to MySQL (10061)
- Initially thought is a permissions issue, so refer to the detailed MySQL 5.7 new permissions and security issues. Find out or not?
- Then, according to the error, refer to a question from Digitalocean. And found that it didn't seem to be
my.cnf
found.
- Feel with Digitalocean described is consistent, then continue to find Conf file, match until.
Solution Solutions
Reference: HTTPS://WWW.JIANSHU.COM/P/93FA9DE59AC1
Finally, the structure of the mysql5.7 configuration file was found to be:
.├── conf.d│ ├── mysql.cnf│ └── mysqldump.cnf├── debian.cnf├── debian-start├── my.cnf -> /etc/alternatives/my.cnf├── my.cnf.fallback├── mysql.cnf└── mysql.conf.d ├── mysqld.cnf └── mysqld_safe_syslog.cnf
In the mysqld.cnf
file, there is this bind-address
configuration.
Change
bind-address = 127.0.0.1
For
bind-address = 0.0.0.0
2. Add password special Note that the new version of the MySQL database in the user table has no password field, but the encrypted user password is stored in the Authentication_string field (for reference:/HTTP/ www.jb51.net/article/77858.htm)
Update Mysql.user set Authentication_string=password (' 123qwe ') where user= ' root ';
Flush privileges;
Quit
Service MySQL Restart
MySQL5.7 Remote connection and add password