1、安装新版本软件在不同目录
/usr/local/mysql5742/
2、停原库(5.6.51)
快速关库功能关闭(优雅关闭、干净的关闭)
/usr/local/mysql5651/bin/mysql -uroot -pchengce243 -S /data/mysql/3306/mysql.sock
mysql> set global innodb_fast_shutdown=0;
/usr/local/mysql5651/bin/mysqladmin -uroot -pchengce243 -S /data/mysql/3306/mysql.sock shutdown
3、使用高版本软件挂低版本数据启动
/usr/local/mysql5742/bin/mysqld_safe --defaults-file=/data/mysql/my3306.cnf --skip-grant-tables --skip-networking &
4、升级
/usr/local/mysql5742/bin/mysql_upgrade -uroot -pchengce243 -S /data/mysql/3306/mysql.sock --force
5、重启数据库到正常状态
关闭
/usr/local/mysql5742/bin/mysqladmin -uroot -pchengce243 -S /data/mysql/3306/mysql.sock shutdown
启动
/usr/local/mysql5742/bin/mysqld_safe --defaults-file=/data/mysql/my3306.cnf &