找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 65|回复: 6

wordpress 连接到数据库时出错 可能是主机负载问题么?

[复制链接]

617

主题

5007

回帖

1万

积分

论坛元老

积分
12045
发表于 2018-12-21 18:45:53 | 显示全部楼层 |阅读模式
连接到数据库时出错
这意味着我们与在localhost的数据库服务器失去了联系。这可能意味着您主机的数据库服务器未在运行。
您确定数据库服务器在运行吗?
您确定数据库服务器并未运行在高负载下吗?

Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?


wp-config的信息肯定是正确的,报错后只有重启LNMP才能恢复。


这是负载导致数据库卡死了么 或者主机的问题?
回复

使用道具 举报

464

主题

6643

回帖

1万

积分

论坛元老

积分
14772
发表于 2018-12-21 18:46:42 | 显示全部楼层
F5 多了。也會死
回复

使用道具 举报

209

主题

598

回帖

1909

积分

金牌会员

积分
1909
发表于 2018-12-21 18:51:59 | 显示全部楼层
很明显是mysql宕机了。。。

你可以尝试下 无法连接的时候 本机查看mysql是什么情况
回复

使用道具 举报

39

主题

1287

回帖

2723

积分

金牌会员

积分
2723
发表于 2018-12-21 22:15:52 | 显示全部楼层
硬盘 没有空间了吧.. mysql 启动不了.
回复

使用道具 举报

253

主题

3608

回帖

8073

积分

论坛元老

积分
8073
发表于 2018-12-21 22:29:45 | 显示全部楼层
查日志是不是被cc了,mysql挂了重启数据库
回复

使用道具 举报

2

主题

155

回帖

352

积分

中级会员

积分
352
发表于 2018-12-21 22:54:07 | 显示全部楼层
我的博客站也经常挂mysql,一直是重启mysql了事,下次看下日志到底什么原因
回复

使用道具 举报

617

主题

5007

回帖

1万

积分

论坛元老

积分
12045
 楼主| 发表于 2018-12-24 16:58:11 | 显示全部楼层
已经禁用了mysql日志功能,5.7.x版本。
/usr/local/mysql/var 以下几个文件比较大,好几十MB,可以删除或释放空间么?
ibtmp1
ibdata1
ib_logfile0
ib_logfile1
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2025-4-19 23:39 , Processed in 0.017944 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表