VPS侦探论坛

 找回密码
 注册
查看: 2983|回复: 2

wordpress数据库问题

[复制链接]
发表于 2019-1-10 13:32:52 | 显示全部楼层 |阅读模式

LNMP 1.5环境下安装wordpress学习建站。vultr 512M,经军歌指导设置了SWAP交换文件。

WP也正常使用了一段时间,昨天发现,再打开网站提示“建立数据库连接时出错”,检查了下LNMP环境运行正常,进数据库发现wordpress的数据库文件不见了。幸好我有备份。

手动重新wp数据库文件,重新安装wp,恢复数据,wp站就正常了。今天再开又是“建立数据库连接时出错”,wp的数据库文件又丢失了。

只得来求助军哥了。

以下是昨天 今天的数据库日志,完整日志在附件。


190109  0:07:47 [Warning] IP address '196.52.43.122' could not be resolved: Name or service not known
190109  8:51:21 [Warning] IP address '61.96.86.28' could not be resolved: Name or service not known
190109 10:26:59 [Warning] IP address '115.231.222.95' could not be resolved: Name or service not known
190109 16:01:12 [Note] Plugin 'FEDERATED' is disabled.
190109 16:01:12 InnoDB: The InnoDB memory heap is disabled
190109 16:01:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190109 16:01:12 InnoDB: Compressed tables use zlib 1.2.7
190109 16:01:12 InnoDB: Using Linux native AIO
190109 16:01:12 InnoDB: Initializing buffer pool, size = 16.0M
190109 16:01:12 InnoDB: Completed initialization of buffer pool
190109 16:01:12 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
190109 16:01:12  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 11374195, file name ./mysql-bin.000007
190109 16:01:12  InnoDB: Waiting for the background threads to start
190109 16:01:13 InnoDB: 5.5.60 started; log sequence number 19858605
190109 16:01:13 [Note] Recovering after a crash using mysql-bin
190109 16:01:13 [Note] Starting crash recovery...
190109 16:01:13 [Note] Crash recovery finished.
190109 16:01:13 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
190109 16:01:13 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
190109 16:01:13 [Note] Server socket created on IP: '0.0.0.0'.
190109 16:01:13 [Note] Event Scheduler: Loaded 0 events
190109 16:01:13 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.60-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
190109 16:02:21 [Warning] IP address '85.93.20.38' could not be resolved: Name or service not known
190109 16:24:30 [Warning] IP address '211.218.126.142' could not be resolved: Name or service not known
190109 16:26:15 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

190109 16:26:15 [Note] Event Scheduler: Purging the queue. 0 events
190109 16:26:15  InnoDB: Starting shutdown...
190109 16:26:16  InnoDB: Shutdown completed; log sequence number 19858615
190109 16:26:16 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

190109 16:26:18 [Note] Plugin 'FEDERATED' is disabled.
190109 16:26:18 InnoDB: The InnoDB memory heap is disabled
190109 16:26:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190109 16:26:18 InnoDB: Compressed tables use zlib 1.2.7
190109 16:26:18 InnoDB: Using Linux native AIO
190109 16:26:18 InnoDB: Initializing buffer pool, size = 16.0M
190109 16:26:18 InnoDB: Completed initialization of buffer pool
190109 16:26:18 InnoDB: highest supported file format is Barracuda.
190109 16:26:18  InnoDB: Waiting for the background threads to start
190109 16:26:19 InnoDB: 5.5.60 started; log sequence number 19858615
190109 16:26:19 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
190109 16:26:19 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
190109 16:26:19 [Note] Server socket created on IP: '0.0.0.0'.
190109 16:26:19 [Note] Event Scheduler: Loaded 0 events
190109 16:26:19 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.60-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
190109 16:30:10 [Warning] IP address '85.93.20.38' could not be resolved: Name or service not known
190109 16:59:48 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

190109 16:59:48 [Note] Event Scheduler: Purging the queue. 0 events
190109 16:59:48  InnoDB: Starting shutdown...
190109 16:59:49  InnoDB: Shutdown completed; log sequence number 22330147
190109 16:59:49 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

190109 17:30:47 [Note] Plugin 'FEDERATED' is disabled.
190109 17:30:47 InnoDB: The InnoDB memory heap is disabled
190109 17:30:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190109 17:30:47 InnoDB: Compressed tables use zlib 1.2.7
190109 17:30:47 InnoDB: Using Linux native AIO
190109 17:30:47 InnoDB: Initializing buffer pool, size = 16.0M
190109 17:30:47 InnoDB: Completed initialization of buffer pool
190109 17:30:47 InnoDB: highest supported file format is Barracuda.
190109 17:30:47  InnoDB: Waiting for the background threads to start
190109 17:30:48 InnoDB: 5.5.60 started; log sequence number 22330147
190109 17:30:48 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
190109 17:30:48 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
190109 17:30:48 [Note] Server socket created on IP: '0.0.0.0'.
190109 17:30:48 [Note] Event Scheduler: Loaded 0 events
190109 17:30:48 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.60-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
190109 17:33:46 [Warning] IP address '85.93.20.38' could not be resolved: Name or service not known
190109 18:41:43 [Warning] IP address '89.248.162.177' could not be resolved: Name or service not known
190109 20:36:40 [Warning] IP address '178.156.202.235' could not be resolved: Name or service not known
190109 22:33:00 [Warning] IP address '27.124.17.108' could not be resolved: Name or service not known
190110  2:56:55 [Warning] IP address '196.52.43.113' could not be resolved: Name or service not known
190110  5:56:26 [Warning] IP address '124.95.128.226' could not be resolved: Name or service not known
190110 12:31:32 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

190110 12:31:32 [Note] Event Scheduler: Purging the queue. 0 events
190110 12:31:32  InnoDB: Starting shutdown...
190110 12:31:34  InnoDB: Shutdown completed; log sequence number 23186134
190110 12:31:34 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

190110 12:31:35 [Note] Plugin 'FEDERATED' is disabled.
190110 12:31:35 InnoDB: The InnoDB memory heap is disabled
190110 12:31:35 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190110 12:31:35 InnoDB: Compressed tables use zlib 1.2.7
190110 12:31:35 InnoDB: Using Linux native AIO
190110 12:31:35 InnoDB: Initializing buffer pool, size = 16.0M
190110 12:31:35 InnoDB: Completed initialization of buffer pool
190110 12:31:35 InnoDB: highest supported file format is Barracuda.
190110 12:31:35  InnoDB: Waiting for the background threads to start
190110 12:31:36 InnoDB: 5.5.60 started; log sequence number 23186134
190110 12:31:36 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
190110 12:31:36 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
190110 12:31:36 [Note] Server socket created on IP: '0.0.0.0'.
190110 12:31:36 [Note] Event Scheduler: Loaded 0 events
190110 12:31:36 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.60-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2019-1-10 14:13:57 | 显示全部楼层


mysql自己是不会去删除文件的,你说的数据库文件丢了,是去 /usr/local/mysql/var/ 下查看的数据库名字的目录吗?

从mysql日志上看的话mysql从9号开始有异常,有可能内存不够用被系统kill掉了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2019-1-10 15:21:20 | 显示全部楼层

回复 2# 的帖子


嗯。 /usr/local/mysql/var/ 下的确是没有wordpress的目录了。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 05:28 , Processed in 0.026263 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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