#准备工作1、停机[root@localhost local]# /etc/init.d/mysqld stopShutting down MySQL.. [确定]2、切换版本[root@localhost local]# mv /root/mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz ./mysql-5.7[root@localhost local]# ln -s mysql-5.7 mysql[root@localhost local]# ls -l总用量 48drwxr-xr-x. 2 root root 4096 9月 23 2011 bindrwxr-xr-x. 2 root root 4096 9月 23 2011 etcdrwxr-xr-x. 2 root root 4096 9月 23 2011 gamesdrwxr-xr-x. 2 root root 4096 9月 23 2011 includedrwxr-xr-x. 2 root root 4096 9月 23 2011 libdrwxr-xr-x. 2 root root 4096 9月 23 2011 lib64drwxr-xr-x. 2 root root 4096 9月 23 2011 libexeclrwxrwxrwx. 1 root root 9 11月 12 03:52 mysql -> mysql-5.7drwxr-xr-x. 13 mysql mysql 4096 11月 12 03:24 mysql-5.6drwxr-xr-x. 9 7161 wheel 4096 10月 12 15:29 mysql-5.7drwxr-xr-x. 2 root root 4096 9月 23 2011 sbindrwxr-xr-x. 5 root root 4096 10月 22 02:36 sharedrwxr-xr-x. 2 root root 4096 9月 23 2011 src3、启动 5.7[root@localhost local]# /etc/init.d/mysqld startStarting MySQL... [确定]4、运行mysql_upgrade -s -s 只更新系统表[root@localhost local]# mysql_upgrade -sThe --upgrade-system-tables option was used, databases won't be touched.Checking if update is needed.Checking server version.Running queries to upgrade MySQL server.Upgrading the sys schema.Upgrade process completed successfully.Checking if update is needed.5、查看升级后的库mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || sys || test |+--------------------+5 rows in set (0.00 sec)#注意多了个sys库,表示升级成功!#降级http://dev.mysql.com/doc/refman/5.7/en/downgrading-to-previous-series.html