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 link only allows the server on which it resides, and it needs to set the allowed IP rights on the MySQL server as follows:
connection command side:
1. Connect to MySQL
Grant all privileges on * * to ' root ' @ ' 192.168.0.1 ' identified by ' 123456 ';
Of course, if you want to give permissions to all IPs, this is the case:
Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ';
3. Immediate entry into force of the mandate
Then telnet remotely or connect to the MySQL database to succeed.
Telnet MySQL appears: is not allowed to connect to this MySQL serverconnection closed by foreign host problem resolution