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.
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./var/log/mysql
is a directory.