我有一個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