Telnet MySQL appears: is not allowed to connect to this MySQL serverconnection

Sometimes when you telnet to a MySQL server, it appears:

Host ' 192.168.0.1 ' isn't allowed to connect to this MySQL serverconnection closed by foreign host.

This is because the MySQL database requesting the li数据库设计nk only allows the ser其他应收款是什么科目ver on which it resides, and it needs to set the allowed IP rightideas on the MySQL server as follows:数据库查询语句

connection command side:1. Connect to MySQL

Mysql-u root-p

2. Authorization

Grant all privileges on * * to ' root ' @ ' 192.168.0.1 ' identified by ' 123456 ';

​Of course, if you want to give perm数据库系统工程师issions to all IPs, this is the case:

Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ';

3. Immediate entry into force of the mandate

Flush privileges;

Then telnet remotely or connect to the MySQL database to succeed.

Reference

Telnet MySQL appears: is not allowed to connect to this MySQL serverconnection closed by foreign host problem resolution

Related Article:​​mysql connect to remote host​​