mysql 5.1升5.6 升级后,出现问题,随手记录,以备用

错误:mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'born_CRM'': Cannot load from mysql.proc. The table is probably corrupted (1728)
Warning: Using a password on the command line interface can be insecure.
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'mysql'': Cannot load from mysql.proc. The table is probably corrupted (1728)





开发在测试机上自己yum安装了一个mysql,目前centos的yum中的mysql版本是5.1,线上都5.6.20了....所以.擦屁股呗....升级测试机.

安装5.6.20 过程就忽略了..
mysqldump 导出数据:
mysql -e "show databases;" -uroot -p| grep -Ev "Database|information_schema|mysql|test|performance_schema" | xargs mysqldump -uroot -p --databases > mysql51.sql

在导入数据.
ps:mysql这个库我是单独导的,一开始我想的是,版本不一样,可能存在差异,所以,就单独导,以防失败.

整个过程都很顺利,后来做备份脚本的时候,发生问题了.....
[root@localhost dbbackup]# ./backup.sh
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'born_CRM'': Cannot load from mysql.proc. The table is probably corrupted (1728)
Warning: Using a password on the command line interface can be insecure.
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'mysql'': Cannot load from mysql.proc. The table is probably corrupted (1728)



辗转反侧才发现问题所在,虽然mysqldump导出的是sql文件,但是mysql库中的表结构,视图等信息,仍然还是5.1的结构.所以需要执行升级脚本.
进入mysql 5.6安装目录:
[root@localhost ~]# cd /opt/mysql3307/bin/
[root@localhost bin]# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed
[root@localhost bin]# mysql_upgrade  -uroot -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv                                 OK
mysql.db                                           OK
.
.
.
.
yrd_e8trunk_zyl.user_origin                        OK
yrd_e8trunk_zyl.user_password_extend               OK
yrd_e8trunk_zyl.user_points                        OK
yrd_e8trunk_zyl.user_points_detail                 OK
yrd_e8trunk_zyl.user_relation                      OK
yrd_e8trunk_zyl.user_role                          OK
OK
[root@localhost bin]#
[root@localhost bin]#


到此结束!
参考资料: https://ma.ttias.be/mysql-show-function-status-where-db-name-cannot-load-from-mysql-proc-the-table-is-probably-corrupted/

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

转载于:http://blog.itpub.net/20892230/viewspace-2127470/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值