Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Reproduce "MySQL server has gone away" in PHP

If you want to debug the issue of "MySQL server has gone away", you can reproduce it with below steps:Modify configuration file:sudo vi /etc/mysql/my.cnf  Make below changes:[mysqld]  wait_timeout = 30  interactive_timeout = 30  Restart the service:sudo /etc/init.d/mysql restart  Write below PHP codes:$link = mysql_connect('127.0.0.1', 'root', 'root');  if (!$link) {      die('Could not connect: ' . mysql_error());  ...

11,546 0       MYSQL DEBUG RMYSQL SERVER HAS GONE AWAY