我是靠谱客的博主 碧蓝服饰,最近开发中收集的这篇文章主要介绍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 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 5所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部