我是靠谱客的博主 碧蓝服饰,这篇文章主要介绍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 root@'%'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.

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

解决方式:

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


最后

以上就是碧蓝服饰最近收集整理的关于ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 5的全部内容,更多相关ERROR内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(130)

评论列表共有 0 条评论

立即
投稿
返回
顶部