Mysql奇怪的连接问题
我有一个奇怪的问题。我在 ubuntu 9.04 上安装了 mysql 5.1。
我已经使用了很长时间(比如说三个月),一切都很顺利。直到我遇到这个非常奇怪的问题。
当我想连接到随机数据库时,我收到以下消息:
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1
Current database: test_cake
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
这只发生在某些数据库上,而其他数据库则完全有用且健康。之后,如果我尝试重新启动服务器,我会得到这个。
shell> /etc/init.d/mysql restart
* Stopping MySQL database server mysqld cat: /var/run/mysqld/mysqld.pid: Permiso denegado
[fail]
* Starting MySQL database server mysqld cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
[fail]
("permiso denegado" is "permission denied").
我不知道该怎么办。我更改了 /var/run/mysqld/mysqld.pid 属性但仍然无法正常工作。
有人可以帮助我吗?
I've a weird problem. I've mysql 5.1 installed on my ubuntu 9.04.
I've used it a long time (say 3 month) and everything was going right. Until i faced this really weird problem.
When i want to connect to a random database i get this message:
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1
Current database: test_cake
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
It only happens with some databases, while others are totally usefull and healthy. After that, if i try to restart the server i get this.
shell> /etc/init.d/mysql restart
* Stopping MySQL database server mysqld cat: /var/run/mysqld/mysqld.pid: Permiso denegado
[fail]
* Starting MySQL database server mysqld cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
cat: /var/run/mysqld/mysqld.pid: Permiso denegado
[fail]
("permiso denegado" is "permission denied").
I don't know what to do. I change the /var/run/mysqld/mysqld.pid attributes but still not working.
Can anybody help me ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这是否有效:
See if this will work: