我是靠谱客的博主 鲜艳太阳,最近开发中收集的这篇文章主要介绍Column count of mysql.user is wrong. Expected 45, found 42. The table is probably corrupted,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
今天升级MySQL数据库,从5.5升级到5.7,升级完成后,遇到Column count of mysql.user is wrong. Expected 45, found 42. The table is probably corrupted报错,经过查找资料发现是数据库升级后需要更新数据库状态。
使用:
mysql_upgrade -u root -p
C:Program FilesMySQLMySQL Server 5.7bin>mysql_upgrade -u root -p
Enter password: *********
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
The sys schema is already up to date (version 1.5.1).
Found 0 sys functions, but expected 22. Re-installing the sys schema.
Upgrading the sys schema.
Checking databases.
sys.sys_config OK
tgaqb.auth_group OK
tgaqb.auth_group_permissions OK
tgaqb.auth_permission OK
tgaqb.auth_user OK
tgaqb.auth_user_groups OK
tgaqb.auth_user_user_permissions OK
tgaqb.django_admin_log OK
tgaqb.django_content_type OK
tgaqb.django_migrations OK
tgaqb.django_session OK
tgaqb.tgaqb_safe_file OK
tgsafer.t_itemclass OK
tgsafer.t_itemprice OK
tgsafer.t_itemreceive OK
tgsafer.t_trouble OK
tgsafer.t_troubletype OK
tgsafer.t_user OK
tgsafer.t_userlevel OK
tgsafer.t_userleveltype OK
tgsafer.t_userrose OK
tgsafer.t_workers OK
Upgrade process completed successfully.
Checking if update is needed.
C:Program FilesMySQLMySQL Server 5.7bin>
然后问他得到解决。
最后
以上就是鲜艳太阳为你收集整理的Column count of mysql.user is wrong. Expected 45, found 42. The table is probably corrupted的全部内容,希望文章能够帮你解决Column count of mysql.user is wrong. Expected 45, found 42. The table is probably corrupted所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复