0

I had a MariaDB server running fine on CentOS 7. I did a mysqldump and imported it on a different machine running the same software. I tried to query in "information_schema," and I got the following:

ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) ERROR: Can't connect to the server

What is unusual to me, and has not been answered by other questions I've searched, is that I only get this error in response to a query in the "information_schema" database. The other databases work fine. I enter "use information_schema;" response is "Database changed." I query "show tables;" and I get the above error. I tried uninstalling MariaDB through yum, reinstalled, and had the same problem. I then deleted the remaining data from the filesystem during a second reinstall. I then did a fresh install of CentOS (this is a pre-production product, so I'm fortunately at liberty to take these steps), installed MariaDB again, and am having the same problem. I'm really at a loss and would appreciate any help.

3
  • These errors are symptomatic of a crash triggered by something corrupt. Find the MySQL error log (usually SELECT @@LOG_ERROR; will give you the path to this file, if you don't know where it is) and review its contents. A crash should be accompanied by a stack trace, the details of which will be in this log. Commented May 21, 2019 at 1:20
  • Thanks for the response. This has been another issue. I can't find a log file, and when I use the "SELECT @@LOG_ERROR;" or "show global variables like 'log_error;" I get an empty field. I've reinstalled CentOS (per my VPS hoster's script) and MariaDB multiple times. How could it be so corrupt?
    – Mitch
    Commented May 21, 2019 at 4:53
  • I'd be skeptical that uninstalling actually removes everything. It isn't likely the "installation" that's corrupt, as a single file with some particularly nasty problem. See if /var/log/mysql is a directory. Commented May 21, 2019 at 5:18

0

You must log in to answer this question.

Browse other questions tagged .