mysql 5.1升5.6 升级后出现问题怎么处置
发布时间:2021-12-24 13:29:59 所属栏目:MySql教程 来源:互联网
导读:这篇文章主要为大家展示了mysql 5.1升5.6 升级后出现问题怎么处理,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下mysql 5.1升5.6 升级后出现问题怎么处理这篇文章吧。 错误:mysqldump: Couldnt execute SHOW FUNC
这篇文章主要为大家展示了“mysql 5.1升5.6 升级后出现问题怎么处理”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“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 . 以上是“mysql 5.1升5.6 升级后出现问题怎么处理”这篇文章的所有内容,感谢各位的阅读! (编辑:上海站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |