3

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 and 127.0.0.1, tcp and socket
  • Set max_allowed_packet to a generous 256M in my.cnf
  • Set wait_timeout to a hefty 600.
  • Run mysql_upgrade from the root account
  • Completely reinstall PHPMyAdmin to the latest version 4.5.2
  • Swap between mysql and mysqlnd 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?

2 Answers 2

7

Change config ssl to false like so:

$cfg['Servers'][$i]['ssl'] = false;
0
1

Finally. The problem is with the "Force SSL" option. Disabling it brings PHPMyAdmin back alive and kicking.

1
  • Hi, can you be more specific please? What do you mean by "Force SSL" option. Both my $cfg['Servers'][$i]['ssl'] = false; and $cfg['Servers'][$i]['ssl_verify'] = false; . But I still keep getting the same error you are getting
    – hridayns
    Commented Jul 28, 2017 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .