大网数据广告活动
服务器运维问答

Fatal error: mysql.user table is damaged. Please run mysql_upgrade

· 52CE 我爱测

I resized an Azure VM and now the MySQL DB running in Windows inside the VM is dead. I am seeing the below fatal error on startup. I tried to run mysql_upgrade as it suggests but that just errors out saying it cannot connect. Doe…

问题原文

原帖链接 · A X · CC BY-SA 3.0

I resized an Azure VM and now the MySQL DB running in Windows inside the VM is dead. I am seeing the below fatal error on startup. I tried to run mysql_upgrade as it suggests but that just errors out saying it cannot connect. Does anyone have any ideas on how to fix this?

2016-07-12T09:59:48.426367Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2016-07-12T09:59:48.426367Z 0 [Note] IPv6 is available.
2016-07-12T09:59:48.426367Z 0 [Note]   - '::' resolves to '::';
2016-07-12T09:59:48.426367Z 0 [Note] Server socket created on IP: '::'.
2016-07-12T09:59:48.426367Z 0 [Note] Shared memory setting up listener
2016-07-12T09:59:48.438315Z 0 [Note] InnoDB: Loading buffer pool(s) from C:\ProgramData\MySQL\MySQL Server 5.7\Data\ib_buffer_pool
2016-07-12T09:59:48.455584Z 0 [Note] InnoDB: Buffer pool(s) load completed at     160712  9:59:48
2016-07-12T09:59:48.455584Z 0 [ERROR] Fatal error: mysql.user table is     damaged. Please run mysql_upgrade.
2016-07-12T09:59:48.455584Z 0 [ERROR] Aborting

已采纳解答

原帖链接 · Kruthika C S · CC BY-SA 3.0

Finally solved! This worked for me : /etc/init.d/mysqld start --skip-grant-tables && mysql_upgrade

Once the upgrade is successful, you do this: /etc/init.d/mysqld restart Or, you can stop and start mysqld seperately.

I had been locked in mysql errors from yesterday on Centos 6.

This really saves your day if you installed a different version of mysql on your system while the system already had another version of mysql installed on it. It's very much likely to get different sorts of errors in this situation.

--skip-grant-tables can come in handy to unlock you out of this situation. If you have some security concerns, check this : link on how to use this option with security.

More details on --skip-grant-tables: This enables anyone to connect without a password and with all privileges, and disables account-management statements such as ALTER USER and SET PASSWORD. Source: Click here to learn more on skip grant from official mysql site

Kruthika

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。