当我尝试启动XAMPP-MySql时不起作用。 我已经尝试修复它,但是我找不到任何实际的解决方案,希望您能找到问题所在。
有日志:
2019-06-26 9:08:35 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-06-26 9:08:35 0 [Note] InnoDB: Uses event mutexes
2019-06-26 9:08:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-06-26 9:08:35 0 [Note] InnoDB: Number of pools: 1
2019-06-26 9:08:35 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-06-26 9:08:35 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-06-26 9:08:35 0 [Note] InnoDB: Completed initialization of buffer pool
2019-06-26 9:08:35 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibdata1' size to 10 MB. Physically writing the file full; Please wait ...
2019-06-26 9:08:35 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibdata1' size is now 10 MB.
2019-06-26 9:08:35 0 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile101 size to 5242880 bytes
2019-06-26 9:08:35 0 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile1 size to 5242880 bytes
2019-06-26 9:08:36 0 [Note] InnoDB: Renaming log file C:\xampp\mysql\data\ib_logfile101 to C:\xampp\mysql\data\ib_logfile0
2019-06-26 9:08:36 0 [Note] InnoDB: New log files created, LSN=45786
2019-06-26 9:08:36 0 [Note] InnoDB: Doublewrite buffer not found: creating new
2019-06-26 9:08:36 0 [Note] InnoDB: Doublewrite buffer created
2019-06-26 9:08:36 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-06-26 9:08:36 0 [Note] InnoDB: Creating foreign key constraint system tables.
2019-06-26 9:08:36 0 [Note] InnoDB: Creating tablespace and datafile system tables.
2019-06-26 9:08:36 0 [Note] InnoDB: Creating sys_virtual system tables.
2019-06-26 9:08:36 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-06-26 9:08:36 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-06-26 9:08:36 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-06-26 9:08:36 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2019-06-26 9:08:36 0 [Note] InnoDB: Waiting for purge to start
2019-06-26 9:08:36 0 [Note] InnoDB: 10.3.16 started; log sequence number 0; transaction id 7
2019-06-26 9:08:36 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-06-26 9:08:36 0 [Note] Server socket created on IP: '::'.
2019-06-26 9:08:36 0 [ERROR] mysqld.exe: Table '.\mysql\user' is marked as crashed and should be repaired
2019-06-26 9:08:36 0 [ERROR] mysqld.exe: Index for table '.\mysql\user' is corrupt; try to repair it
2019-06-26 9:08:36 0 [ERROR] Couldn't repair table: mysql.user
2019-06-26 9:08:36 0 [ERROR] Fatal error: Can't open and lock privilege tables: Index for table 'user' is corrupt; try to repair it
答案 0 :(得分:17)
这是由于 C:\ xampp \ mysql \ data \ mysql 中的某些文件损坏了。
解决方案:
答案 1 :(得分:7)
从xampp / mysql / backup /复制所有文件和文件夹,并将其粘贴到xampp / mysql / data /。如果要求替换,则单击全部替换
答案 2 :(得分:3)
解决方案只是一个
从... xampp / mysql / backup / ...复制所有文件,然后粘贴到... / xampp / mysql / data /
答案 3 :(得分:0)
我已经解决了,只需再次删除并下载xampp,有时从0开始再次是某人找到的最佳解决方案。
答案 4 :(得分:0)
只需从my.ini编辑此行:
;脚本可能消耗的最大内存量(128MB) ; http://php.net/memory-limit memory_limit = 128M->选择所需大小。
答案 5 :(得分:0)
对我来说,我做了一个data文件夹的备份,然后将/backup/中的文件和文件夹复制到/data/,服务启动成功。我不必从备份数据中复制任何内容,除了 ibdata1 没有它抱怨表不存在。
答案 6 :(得分:0)
删除或移动 ib_logfile0 和 ib_logfile1 到备份文件夹..并尝试重新启动 Mysql 这将恢复这些文件,并且 mysql 应该可以在不丢失任何数据的情况下运行。