First: I've searched all over Google and although this looks like an infamous error, none is actually my case and hence no fix is available.
OK so today I encountered this something weird: PHPMyAdmin suddenly refuses to log me in. Logging and checking show #2006 - MySQL server has gone away
. Below is the list of fixes I've desperatedly tried:
- Switch between
localhost
and127.0.0.1
,tcp
andsocket
- Set
max_allowed_packet
to a generous256M
inmy.cnf
- Set
wait_timeout
to a hefty600
. - Run
mysql_upgrade
from theroot
account - Completely reinstall PHPMyAdmin to the latest version 4.5.2
- Swap between
mysql
andmysqlnd
PHP extensions - Completely remove PHP7, reinstall 5.6, and upgrade to 7 again (!)
What's strange is, normal mysqli_*
functions work fine. Adminer works without a flaw as well, which leads me to a conclusion that this is most likely PHPMyAdmin's fault.
And this is my spec:
- CentOS 6.5
- MySQL 5.5.44
- PHPMyAdmin 4.5.2
- mysql/mysqlnd extension
- PHP 7.0 or 5.6
Any ideas?