mysql> grant all on blog.* to lisi@localhost identified by '123.com';
報錯內容如下:
ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50565, now running 50648. Please use mysql_upgrade to fix this error
原因:可能是因爲升級更高版本的mysql數據庫時,沒有升級好導致的。
解決方法:
[root@qzt001 ~]# mysql_upgrade -uroot -pqinziteng