我只是为win64安装了XAMPP 7.3.6-2-VC15,当我安装它时,MySQL从控制面板启动了,没有错误,ET都可以。
重新启动我的PC后,Apache仍在工作,但是MySQL拒绝启动!我尝试重新安装Xampp,但完全相同。mysql工作正常,然后在重新启动后停止工作。
这是我拥有的几个日志...
在控制面板中:
09:48:10 [mysql] Attempting to start MySQL app...
09:48:10 [mysql] Status change detected: running
09:48:11 [mysql] Status change detected: stopped
09:48:11 [mysql] Error: MySQL shutdown unexpectedly.
09:48:11 [mysql] This may be due to a blocked port, missing dependencies,
09:48:11 [mysql] improper privileges, a crash, or a shutdown by another method.
09:48:11 [mysql] Press the Logs button to view error logs and check
09:48:11 [mysql] the Windows Event Viewer for more clues
09:48:11 [mysql] If you need more help, copy and post this
09:48:11 [mysql] entire log window on the forums
和日志文件中:
2019-07-02 9:48:10 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-07-02 9:48:10 0 [Note] InnoDB: Uses event mutexes
2019-07-02 9:48:10 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-02 9:48:10 0 [Note] InnoDB: Number of pools: 1
2019-07-02 9:48:10 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-07-02 9:48:10 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-07-02 9:48:10 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-02 9:48:10 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1834407
2019-07-02 9:48:10 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-07-02 9:48:10 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-07-02 9:48:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-02 9:48:10 0 [Note] InnoDB: Setting file 'C:xamppmysqldataibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-07-02 9:48:10 0 [Note] InnoDB: File 'C:xamppmysqldataibtmp1' size is now 12 MB.
2019-07-02 9:48:10 0 [Note] InnoDB: Waiting for purge to start
2019-07-02 9:48:10 0 [Note] InnoDB: 10.3.16 started; log sequence number 1834416; transaction id 265
2019-07-02 9:48:10 0 [Note] InnoDB: Loading buffer pool(s) from C:xamppmysqldataib_buffer_pool
2019-07-02 9:48:10 0 [Note] InnoDB: Buffer pool(s) load completed at 190702 9:48:10
2019-07-02 9:48:10 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-07-02 9:48:10 0 [Note] Server socket created on IP: '::'.
我尝试以下内容:
- 更改3306 =>没有成功的端口
- 运行XAMP控制面板作为Admin =>无成功
- 删除临时表IBDATA1和IBTMP1 =>没有成功
如果有人有想法...
编辑:我尝试通过管理面板作为管理员作为Windows服务安装。因此,我在日志中有一些新行。似乎用户表已损坏...我该如何维修?
2019-07-02 10:04:41 0 [ERROR] mysqld.exe: Table '.mysqluser' is marked as crashed and should be repaired
2019-07-02 10:04:41 0 [ERROR] mysqld.exe: Index for table '.mysqluser' is corrupt; try to repair it
2019-07-02 10:04:41 0 [ERROR] Couldn't repair table: mysql.user
2019-07-02 10:04:41 0 [ERROR] Fatal error: Can't open and lock privilege tables: Index for table 'user' is corrupt; try to repair it
这对我有帮助:
从控制面板打开外壳,并使用此命令启动mySQL:
mysqld –-console –-skip-grant-tables –-skip-external-locking
使用此命令从控制面板打开另一个外壳,并修复数据库:
mysqlcheck -r --databases mysql --use-frm
停止mysql,封闭外壳并正常重新启动mysql。
基于:re:损坏mysql.users如何修复
我像你一样遇到了这个问题。我已经解决了下面的问题。
Copy from xampp/mysql/backup folder and paste in xampp/mysql/data folder except ibdata1 file.
如果您从XAMPP/MySQL/数据替换IBDATA1文件,则某些数据库将不存在错误表。
这对我有帮助:
从控制面板打开外壳,并使用此命令启动mySQL:
mysqld - console - skip-grant-tables - skip-external-locking
使用此命令从控制面板打开另一个外壳,并修复数据库:
mysqlcheck -r -databases mysql -use -frm