Question

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 ?

Was it helpful?

Solution

See if this will work:

su                   (become root)
su mysql             (become user mysql, or whatever account mysql runs as)
cd /var/run/mysqld   (see if the directory is accessible to mysql)
cat mysqld.pid       (see if the file is accessible)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top