ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 5

来源:转载

在设置mysql数据库远程登录时碰到设置失败的情况,查找网上资料后记录一下

mysql> grant all privileges on *.* to [email protected]'%'identified by '密码';ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50556, now running 50637. Please use mysql_upgrade to fix this error.mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION -> ;ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50556, now running 50637. Please use mysql_upgrade to fix this error.

错误是因为升级过数据库,升级之后没更新数据库里的结构信息导致的

解决方式:

[[email protected]_0_7_centos ~]# mysql_upgrade -u root -p 密码Enter password:Looking for 'mysql' as: mysql......


分享给朋友:
您可能感兴趣的文章:
随机阅读: