One way to fix this:
site access appears as the title error, after checking my.cnf, found innodb_buffer_pool_size = 2048M set too large, adjusted to Innodb_buffer_pool_size = 1024M can, There are other solutions to the problem on the Internet, but none of them can solve my problem.
Lost connection to MySQL server at ' reading initial communication ' Error resolution
Last solved this problem, today again met, suddenly lost memory, and did some work after finally finished, this must be recorded, lest the next time waste
1, modify the MySQL configuration file
Vi/etc/my.cnf
[mysqld] section plus skip-name-resolve
Before this, you have to open the MySQL remote access permission, or add skip-grant-table (not recommended)
2. Modify Hosts.allow
Vi/etc/hosts.allow
Add Mysqld:ALL:ALLOW
Mysqld-max:all:allow
Other Netizen's supplement:
MySQL Tutorial ' reading initial communication packet ' error resolution
This problem occurs when the server suddenly turns off the problem.
The error message is:
Unable to link the database tutorial (MySQL) server, please check the server address, username, password.
Code: 2013
Error: Lost connection to MySQL server at ' reading initial communication PA (www.jb51.net) cket ', System error:0
Let's look at the specific solution
Method One: The solution is to add a startup parameter to the [MYSQLD] section inside the my.cnf skip-name-resolve
Method Two: If you do not, you can try to reload MySQL server so that the database to guide the OK.
Summarize:
If you can not reload MySQL situation can do the machine well, it is the best, not million must not have to reload MySQL OH