2

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
  • 2
    Start this with skip-grant-tables and then run mysql_upgrade. – Navern Jul 12 '16 at 11:20
  • That didn't work – A br Aug 6 '16 at 6:10
5

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.