gpt4 book ai didi

mysqld.exe : Table '.\mysql\db' is marked as crashed and should be repaired

转载 作者:行者123 更新时间:2023-12-03 13:50:54 24 4
gpt4 key购买 nike

MySQL 服务将不再在 Windows 10 计算机上的 XAMPP 安装上启动。 XAMPP 控制台中的错误消息说:

Error: MySQL shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method.



错误日志显示:
InnoDB: using atomic writes.
2019-10-14 20:43:47 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-10-14 20:43:47 0 [Note] InnoDB: Uses event mutexes
2019-10-14 20:43:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-10-14 20:43:47 0 [Note] InnoDB: Number of pools: 1
2019-10-14 20:43:47 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-10-14 20:43:47 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-10-14 20:43:47 0 [Note] InnoDB: Completed initialization of buffer pool
2019-10-14 20:43:48 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-10-14 20:43:48 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-10-14 20:43:48 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-10-14 20:43:48 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2019-10-14 20:43:48 0 [Note] InnoDB: 10.4.6 started; log sequence number 6899920; transaction id 13408
2019-10-14 20:43:48 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2019-10-14 20:43:48 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-10-14 20:43:48 0 [Note] Server socket created on IP: '::'.

Windows 事件查看器包含 5 个单独的错误消息:
mysqld.exe: Table '.\mysql\db' is marked as crashed and should be repaired
mysqld.exe: Index for table '.\mysql\db' is corrupt; try to repair it
Couldn't repair table: mysql.db
Fatal error: Can't open and lock privilege tables: Index for table 'db' is corrupt; try to repair it
Aborting

当尝试连接到 MySQL 时,它不起作用(这是有道理的,因为 MySQL 服务不会运行)。这是尝试连接后 CMD 中给出的错误消息: ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (10061) .

与需要修复的 MySQL 表相关的帖子需要连接到 MySQL,因此在这种情况下它们无济于事。如果可以修复 mysql.db在没有连接 MySQL 的 Windows 10 机器上,这样做的步骤是什么?

最佳答案

This one helped for me:

Open shell from from control panel and start mysql with this command:

mysqld –-console –-skip-grant-tables –-skip-external-locking

Open another shell from control panel and repair database with this command:

mysqlcheck -r --databases mysql --use-frm

Stop mysql, close shells and restart mysql normally.


发表于以下:
https://stackoverflow.com/a/57001732

关于mysqld.exe : Table '.\mysql\db' is marked as crashed and should be repaired,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58386240/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com