MySQL error 2002: error establishing connection to database_MySQL
程序员文章站
2022-06-12 10:52:42
...
Ah, panic mode at 7AM this morning, when a bunch of WordPress sites I host with a Digital Ocean droplet are all suddenly down, only to be presented with the infamous WordPress database error being displayed in the browser;Error Establishing a Database Connection.
I quickly go to access the phpMyAdmin login (which is up), enter my login credentials, followed by aMySQL error 2002greeting. I can’t log in… huh?!
Surely not, but perhaps the MySQL server isn’t running??! So I SSH into the box, and run:
service mysql status
Only to find out that indeed,MySQL server is not running!
Simple fix – start up the MySQL server again:
service mysql start
And everything went back to normal once more. Apparently if there’s a sudden spike in CPU memory usage it can take down the MySQL server… something to look into if it keeps reoccurring I guess.
上一篇: PHP字符处理函数的问题总结
推荐阅读
-
mysql中异常错误ERROR:2002的解决方法
-
Mysql启动报ERROR:2002的分析与解决
-
Ubuntu下出现Mysql error(2002)问题的解决方法
-
mysql中异常错误ERROR:2002的解决方法
-
MySQL错误 ERROR 2002 (HY000): Can't connect to local MySQL server through socket 的解决办法
-
linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
-
关于CentOS输入mysql提示ERROR 2002 (HY000):Can't connect to_MySQL
-
MySQL在服务器端出现ERROR 2002的解决办法
-
ERROR 2002 (HY000): Can't connect to local MySQL server thro
-
ERROR 2013 (HY000): Lost connection to MySQL server at ‘rea_MySQL