本地升级的方式:
小版本升级:
1,只需要将 /home/data/mysql/bin/ 下面的 mysqld(高版本) 替换 mysqld(低版本)
2. 再
将 /home/data/mysql/share/english 下面的 errmsg.sys(高版本) 替换
errmsg.sys(低版本)
大版本升级
1.将低版本的数据目录data 拷贝到高版本去,以高版本的mysqld_safe方式启动
2.[root@localhost mydata]# /home/data/mysql/bin/mysql_upgrade --defaults-file=/home/data/mydata/3309/my.cnf --进行升级,更新权限表
[root@localhost mydata]#/home/data/mysql/bin/mysql_upgrade --sock=/data/mydata/3306/mysql.sock -uroot -phaodai_2012_2013 --上面失败就用这个 指定sock的方式升级.5.7得用socket
注意:将低版本的innobackupex全备恢复后 用高版本的mysql启动也是同理需要升级
如果在mysql 的错误日志文件中,看到了
如果看到:
-
2016-03-24 11:17:29 48118 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
-
2016-03-24 11:17:29 48118 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
-
2016-03-24 11:17:29 48118 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
-
2016-03-24 11:17:29 48118 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
-
2016-03-24 11:17:29 48118 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure --关于performance_schema的错误
解决办法:升完级后重启两便数据库吧
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29096438/viewspace-1839942/
,如需转载,请注明出处,否则将追究法律责任。