我是靠谱客的博主 靓丽大山,这篇文章主要介绍解决 MySQL 报错 “ Column count of mysql.user is wrong...”,现在分享给大家,希望可以做个参考。

新建 MySQL 账户报错:

复制代码
1
Column count of mysql.user is wrong. Expected 45, found 43. Created with MySQL 5

错误是由于你曾经升级过数据库,升级完后没有使用mysql_upgrade升级数据结构造成的。

解决办法:使用mysql_upgrade命令

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
$ 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.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 Upgrading the sys schema. Checking databases. pan.oc_accounts OK pan.oc_activity OK pan.oc_activity_mq OK pan.oc_addressbookchanges OK pan.oc_addressbooks OK pan.oc_appconfig OK pan.oc_authtoken OK pan.oc_bruteforce_attempts OK pan.oc_calendar_invitations OK pan.oc_calendar_reminders OK pan.oc_calendar_resources OK pan.oc_calendar_resources_md OK pan.oc_calendar_rooms OK pan.oc_calendar_rooms_md OK pan.oc_calendarchanges OK pan.oc_calendarobjects OK pan.oc_calendarobjects_props OK pan.oc_calendars OK pan.oc_calendarsubscriptions OK pan.oc_cards OK pan.oc_cards_properties OK pan.oc_collres_accesscache OK pan.oc_collres_collections OK pan.oc_collres_resources OK pan.oc_comments OK pan.oc_comments_read_markers OK pan.oc_credentials OK pan.oc_dav_cal_proxy OK pan.oc_dav_shares OK pan.oc_directlink OK pan.oc_external_applicable OK pan.oc_external_config OK pan.oc_external_mounts OK pan.oc_external_options OK pan.oc_federated_reshares OK pan.oc_file_locks OK pan.oc_filecache OK pan.oc_filecache_extended OK pan.oc_files_trash OK pan.oc_flow_checks OK pan.oc_flow_operations OK pan.oc_group_admin OK pan.oc_group_user OK pan.oc_groups OK pan.oc_jobs OK pan.oc_login_flow_v2 OK pan.oc_maps_address_geo OK pan.oc_maps_apikeys OK pan.oc_maps_device_points OK pan.oc_maps_devices OK pan.oc_maps_favorites OK pan.oc_maps_photos OK pan.oc_maps_tracks OK pan.oc_migrations OK pan.oc_mimetypes OK pan.oc_mounts OK pan.oc_notes_meta OK pan.oc_notifications OK pan.oc_notifications_pushtokens OK pan.oc_oauth2_access_tokens OK pan.oc_oauth2_clients OK pan.oc_ocdownloader_adminsettings OK pan.oc_ocdownloader_personalsettings OK pan.oc_ocdownloader_queue OK pan.oc_phonetrack_devices OK pan.oc_phonetrack_filtersb OK pan.oc_phonetrack_geofences OK pan.oc_phonetrack_points OK pan.oc_phonetrack_proxims OK pan.oc_phonetrack_pubshares OK pan.oc_phonetrack_sessions OK pan.oc_phonetrack_shares OK pan.oc_phonetrack_tileserver OK pan.oc_preferences OK pan.oc_privacy_admins OK pan.oc_properties OK pan.oc_schedulingobjects OK pan.oc_share OK pan.oc_share_external OK pan.oc_storages OK pan.oc_systemtag OK pan.oc_systemtag_group OK pan.oc_systemtag_object_mapping OK pan.oc_talk_commands OK pan.oc_talk_guests OK pan.oc_talk_participants OK pan.oc_talk_rooms OK pan.oc_talk_signaling OK pan.oc_text_documents OK pan.oc_text_sessions OK pan.oc_text_steps OK pan.oc_trusted_servers OK pan.oc_twofactor_backupcodes OK pan.oc_twofactor_providers OK pan.oc_users OK pan.oc_vcategory OK pan.oc_vcategory_to_object OK pan.oc_whats_new OK sys.sys_config OK Upgrade process completed successfully. Checking if update is needed.

参考文献

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

最后

以上就是靓丽大山最近收集整理的关于解决 MySQL 报错 “ Column count of mysql.user is wrong...”的全部内容,更多相关解决内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部