-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLSTATE[HY000] [2002] Can't connect to local MySQL (oC - 5.0.10) #4395
Comments
Did you make sure, that mysql is still running, by e.g. connecting manually, phpmyadmin, etc. ? Otherwise you may try |
yes this is not a owncloud bug, probably solved by the above, or might even be that the socket file is located elsewhere, you can see this with for example: "netstat -lnp" this will show your mysql socketfile location by the bottom if you have mysql installed locally. |
Ok, thanks for quick reply! I found the socket on var/run/mysqld/mysqld.sock - now, how do I know if mysql is active? And also, how do I activate it if it´s not activated? Thanks for your help. |
As @kiranos said, this is not an owncloud bug, but rather something about you setting up your server. |
After a bit of research I found out what the problem was: My power went off due to a thunderstorm and that casued mysql and apache2 to go down by force. It seems that almost everybody with this issue have been closing down apache2 or mysql by force and that have casued corrupted files and error messages. Is there any way to protect this from happening in the owncloud code? Like if files woulnd´t get corrupted if mysql och apache2 was forceclosed. I rescued the old drive with a backup I had and the problem was gone. |
if it was killed abruptly its a good chance that the lockfile was not deleted ok even though mysql was killed. But the startup script usually take care of these conditions. |
Got this message now, even after update to 5.0.10
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 17:34
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 17:34
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 17:34
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 17:34
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 17:34
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 3:24
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 3:24
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 12.08.2013 3:24
Fatal core SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
The text was updated successfully, but these errors were encountered: