mysql 1558 - Column count of mysql.proc is wrong 的解决

起因是原来mysql5.0.47的,后来想用分区表,故整个库导出,

然后倒入5.1.51的环境中,但是在创建存储过程中出现如下错误:

1558 - Column count of mysql.proc is wrong. Expected 20, found 16

 

1 :保险一点先dump或者冷备份:

mysqldump -uroot -p111111 --quick --master-data=1 --all-databases --flush-logs --lock-tables  >

 

2 解决办法:

使用命令:mysql_upgrade 就可以解决

 

mysql_upgrade -u root --datadir=/var/lib/mysql/ --basedir=/ --password=123456

 

下面是我操作的过程:

[root@db lib]# mysql_upgrade -u root -p111111 -hdb --datadir=/var/lib/mysql/ --basedir=/

mysql_upgrade: the '--datadir' option is always ignored

mysql_upgrade: the '--basedir' option is always ignored

Looking for 'mysql' as: mysql

Looking for 'mysqlcheck' as: mysqlcheck

Running 'mysqlcheck' with connection arguments: '--host=db'

Running 'mysqlcheck' with connection arguments: '--host=db'

mysql.columns_priv                                 OK

mysql.db                                           OK

mysql.event                                        OK

mysql.func                                         OK

mysql.general_log

Error    : You can't use locks with log tables.

status   : OK

mysql.help_category                                OK

mysql.help_keyword                                 OK

mysql.help_relation                                OK

mysql.help_topic                                   OK

mysql.host                                         OK

mysql.ndb_binlog_index                             OK

mysql.plugin                                       OK

mysql.proc                                         OK

mysql.procs_priv                                   OK

mysql.servers                                      OK

mysql.slow_log

Error    : You can't use locks with log tables.

status   : OK

mysql.student                                      OK

mysql.t1                                           OK

mysql.t2                                           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

................................................

test.newuser                                       OK

test.usertag                                       OK

Running 'mysql_fix_privilege_tables'...

WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.

WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (latin1_swedish_ci). Please verify if necessary.

WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.

OK

[root@db lib]#

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/758322/viewspace-716971/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/758322/viewspace-716971/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值