打印

wordpress数据库问题

wordpress数据库问题

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



附件: 您所在的用户组无法下载或查看附件

TOP

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

从mysql日志上看的话mysql从9号开始有异常,有可能内存不够用被系统kill掉了

LNMP付费问题排查/LNMP技术支持/Paypal信用卡代付/代购VPS,域名,软件等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 要求反馈问题!

TOP

回复 2# 的帖子

嗯。 /usr/local/mysql/var/ 下的确是没有wordpress的目录了。

TOP