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

来源:互联网 发布:数控车床编程实例 简单 编辑:程序博客网 时间:2024/06/04 22:21

错误信息如下:

ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50552, now running 50637. Please use mysql_upgrade to fix this error

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

解决办法:

使用mysql_upgrade命令修复

[root@localhost charsets]#  mysql_upgrade -u root -p Enter password: Looking for 'mysql' as: mysqlLooking for 'mysqlcheck' as: mysqlcheckRunning 'mysqlcheck with default connection argumentsWarning: Using a password on the command line interface can be insecure.Running 'mysqlcheck with default connection argumentsWarning: Using a password on the command line interface can be insecure.mysql.columns_priv                                 OKmysql.db                                           OKmysql.event                                        OKmysql.func                                         OKmysql.general_log                                  OKmysql.help_category                                OKmysql.help_keyword                                 OKmysql.help_relation                                OKmysql.help_topic                                   OKmysql.host                                         OKmysql.ndb_binlog_index                             OKmysql.plugin                                       OKmysql.proc                                         OKmysql.procs_priv                                   OKmysql.proxies_priv                                 OKmysql.servers                                      OKmysql.slow_log                                     OKmysql.tables_priv                                  OKmysql.time_zone                                    OKmysql.time_zone_leap_second                        OKmysql.time_zone_name                               OKmysql.time_zone_transition                         OKmysql.time_zone_transition_type                    OKmysql.user                                         OKRunning 'mysql_fix_privilege_tables'...Warning: Using a password on the command line interface can be insecure.Running 'mysqlcheck with default connection argumentsWarning: Using a password on the command line interface can be insecure.Running 'mysqlcheck with default connection argumentsWarning: Using a password on the command line interface can be insecure.OK

修复完成

阅读全文
0 0
原创粉丝点击