Developing an application system to connect to the MySQL database of the company’s test server is very slow, but connecting to the local MySQL database is very fast. At first, it was thought that it may be caused by network connection problems. After Ping and routing, it was found that the network communication is normal, and the local connection on the MySQL machine is very fast, Therefore, the network problem has been basically eliminated, so I want to see if it is a MySQL configuration problem. After querying MySQL related documents and network search, it seems that a configuration can solve such a problem, that is, add the following configuration parameters to the MySQL configuration file:
[mysqld]
skip-name-resolve
Under Linux, the configuration file is/etc/my.cnf. Under windows, the configuration file is my.ini file under MySQL installation directory. Note that the configuration is added under [mysqld]. After changing the configuration and saving it, restart MySQL and conduct remote connection test. Everything is restored as before.
Similar Posts:
- mysql Remote connection problems: Lost connection to MySQL server at ‘reading initial communication packet’, syste…
- [How to Solve] Lost connection to MySQL server at ‘reading i…
- Solution to error reporting in starting MySQL
- [Solved] Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
- Linux: MySQL Start Error: Starting MySQL.Manager of pid-file quit without updating file.[FAILED]
- How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)
- [Solved] MySql Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts…
- [Solved] SQLyog Connect MYSQL Error: 2058 plugin caching_sha2_password could not be loaded
- Securityerror: error # 2148: SWF file (SWF file cannot access this
- [Solved] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure