我有一个mont前安装mysql。我每天使用都没有任何问题。现在,我的mysql很奇怪。我可以登录到MySQL,并一直成功。但有时无法运行查询。本地Mysql成功登录,但丢失连接每次运行查询
这是unseccessfull查询的示例:
[email protected] ~ $ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use sps;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show databases;
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/run/mysqld/mysqld.sock' (111)
ERROR:
Can't connect to the server
mysql>
我很迷茫。如何解决这个问题呢?
没有人希望备份...每个人都想恢复... – ratmalwer