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.
mysql_ping
How can I fix this problem?
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.
mysqli.reconnect = "1"
Ref. check if mysql connection is really
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, .
Stop and start the mysql server to fix this problem.