"MySQL server is gone" in mysqli

My network threw a "MySQL server is gone" error. I google, I will find a method that uses the function mysql_ping, but I use the mysqli extension, not mysql.

How can I fix this problem?

+5
source share
3 answers

There is a mysqli_ping method for this:

http://us3.php.net/manual/en/mysqli.ping.php

However, in my experience, ping is not needed. All I had to do was add mysqli.reconnect = "1"to php.ini.

Ref. check if mysql connection is really

+4
source

You may get this error when your failed MySQL server query checks the MySQL error log file for this.

wait_timeout interactive_timeout MySQL MySQL . , MySQL.

, , MySQL, .

+1

Stop and start the mysql server to fix this problem.

0
source

All Articles