首页 > 数据库 > mysql教程 > MySQL error 2002: error establishing connection to database_MySQL

MySQL error 2002: error establishing connection to database_MySQL

WBOY
发布: 2016-06-01 13:08:09
原创
1093 人浏览过

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.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板