我正在开发 XAMPP 服务器。我昨天完成了工作,今天打开了我的系统。现在,当我从 XAMPP 控制面板启动 MySQL 时,我收到错误:
Error: MySQL shutdown unexpectedly.
5:49:38 PM [mysql] This may be due to a blocked port, missing dependencies,
5:49:38 PM [mysql] improper privileges, a crash, or a shutdown by another method.
5:49:38 PM [mysql] Press the Logs button to view error logs and check
5:49:38 PM [mysql] the Windows Event Viewer for more clues
5:49:38 PM [mysql] If you need more help, copy and post this
5:49:38 PM [mysql] entire log window on the forums
MySQL 日志文件 - MySQL 错误
2021-08-23 17:49:35 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-08-23 17:49:35 0 [Note] InnoDB: Uses event mutexes
2021-08-23 17:49:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-08-23 17:49:35 0 [Note] InnoDB: Number of pools: 1
2021-08-23 17:49:35 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-08-23 17:49:35 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-08-23 17:49:35 0 [Note] InnoDB: Completed initialization of buffer pool
2021-08-23 17:49:36 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-08-23 17:49:36 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-08-23 17:49:36 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-08-23 17:49:36 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-08-23 17:49:36 0 [Note] InnoDB: Waiting for purge to start
2021-08-23 17:49:36 0 [Note] InnoDB: 10.4.13 started; log sequence number 47242; transaction id 9
2021-08-23 17:49:36 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-08-23 17:49:36 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-08-23 17:49:36 0 [Note] InnoDB: Buffer pool(s) load completed at 210823 17:49:36
2021-08-23 17:49:36 0 [Note] Server socket created on IP: '::'.
昨天工作得很顺利。昨天我什么也没做。 我尝试了解决方案 - 如何解决“错误:MySQL 意外关闭”?
尝试解决方案后,它可以工作,但是引擎中不存在许多表。 喜欢 -
Table 'database.meditemimg' doesn't exist in engine
。
我的数据库中有 10 个表。存在 3 个表,但应用此方法后 7 个表不存在:
Rename the folder mysql/data to mysql/data_old (you can use any name)
Create a new folder mysql/data
Copy the content that resides in mysql/backup to the new mysql/data folder
Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
Start MySQL from XAMPP control panel
排序规则更改为 7 个表正在使用。
还有其他方法修复 MySQL 关闭错误吗?
从 mysql/bin 扩展 my.ini
上的缓冲区大小相关值首先尝试使用 XAMPP 附带的 MySQL 备份文件夹。因此,请执行后续步骤: