MySQL upgrade breaking things

If you’ve just updated your MySQL installation and have found this happening:
060511 22:38:11 [Warning] ‘./mysql/host’ had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
060511 22:38:11 [Warning] ‘./mysql/user’ had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
060511 22:38:11 [Warning] ‘./mysql/db’ had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
060511 22:38:11 [ERROR] Fatal error: mysql.user table is damaged or in unsupported 3.20 format.

Then you need to run this:
mysql_fix_privilege_tables

However, you’ve probably stopped mysql and can’t get it to start again to run that script! Well, that’s the problem I had anyway… to remedy this, do this:
mysqld_safe –skip-grant-tables –user=root &
mysql_fix_privilege_tables
pkill mysqld
/etc/init.d/mysqld restart

Good luck!

Leave a Reply