MySQL损坏,数据库已删除

时间:2018-09-21 10:09:24

标签: mysql

我使用MySQL 5.6。有一次我的服务器突然停止了。 MySQL尚未启动。在存储数据库文件夹和文件的文件夹中-所有文件夹都消失了,只有文件夹“ WARNINGS”在那里。当我尝试启动mysql时,我得到下一个日志:

2018-09-21 03:02:31 0 [Note] c:\ospanel\modules\database\MySQL-5.6-x64\bin\mysqld.exe (mysqld 5.6.38) starting as process 4600 ...
2018-09-21 03:02:31 4600 [Note] Plugin 'FEDERATED' is disabled.
c:\ospanel\modules\database\MySQL-5.6-x64\bin\mysqld.exe: Table 'mysql.plugin' doesn't exist
2018-09-21 03:02:31 4600 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2018-09-21 03:02:31 4600 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-09-21 03:02:31 4600 [Note] InnoDB: The InnoDB memory heap is disabled
2018-09-21 03:02:31 4600 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2018-09-21 03:02:31 4600 [Note] InnoDB: Memory barrier is not used
2018-09-21 03:02:31 4600 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-09-21 03:02:31 4600 [Note] InnoDB: Not using CPU crc32 instructions
2018-09-21 03:02:31 4600 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-09-21 03:02:31 4600 [Note] InnoDB: Completed initialization of buffer pool
2018-09-21 03:02:31 4600 [Note] InnoDB: Highest supported file format is Barracuda.
2018-09-21 03:02:31 4600 [Note] InnoDB: The log sequence numbers 633063664 and 633063664 in ibdata files do not match the log sequence number 633063674 in the ib_logfiles!
2018-09-21 03:02:31 4600 [Note] InnoDB: Database was not shutdown normally!
2018-09-21 03:02:31 4600 [Note] InnoDB: Starting crash recovery.
2018-09-21 03:02:31 4600 [Note] InnoDB: Reading tablespace information from the .ibd files...
2018-09-21 03:02:31 4600 [Note] InnoDB: Restoring possible half-written data pages 
2018-09-21 03:02:31 4600 [Note] InnoDB: from the doublewrite buffer...
2018-09-21 03:02:32 4600 [Note] InnoDB: 128 rollback segment(s) are active.
2018-09-21 03:02:32 4600 [Note] InnoDB: Waiting for purge to start
2018-09-21 03:02:32 4600 [Note] InnoDB: 5.6.38 started; log sequence number 633063674
2018-09-21 03:02:32 4600 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2018-09-21 03:02:32 4600 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
2018-09-21 03:02:32 4600 [Note] Server socket created on IP: '0.0.0.0'.
2018-09-21 03:02:32 4600 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

我一直在尝试mysql_upgrade,mysqld --initialize-insecure,它对我没有帮助。

我的脚本功能是每天24小时不停止地运行16个线程。因此,每次都有16个连接连接到DB。 在mysql配置中,我已设置:

interactive_timeout=31536000
wait_timeout=2147483

没有比这更寻常的了。

我第二次遇到这种情况,因为数据库损坏了。 我想知道为什么会遇到这个问题以及如何解决。

0 个答案:

没有答案