标签:www size system div mamicode tar 升级 linu x86_64
指定目录/server升级(如果不明白如何安装的点击https://www.cnblogs.com/chenlifan/p/13849099.html)
#启动数据库 创建一个数据库 查看
[root@db02 ~]# systemctl start mysqld
[root@db02 ~]# mysql -e "create database old charset utf8mb4;"
[root@db02 ~]# mysql -e "show databases;"
[root@db02 ~]# wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz
#解压
[root@db02 ~]# tar xf mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz
#移动到指定目录
[root@db02 ~]# mv mysql-5.7.20-linux-glibc2.12-x86_64 /service/mysql-5.7.20
[root@db02 ~]# systemctl stop mysqld
[root@db02 ~]# rm -rf /service/mysql
[root@db02 ~]# ln -s /service/mysql-5.7.20 /service/mysql
[root@db02 ~]# cp -a /service/mysql-5.6.42/data /service/mysql-5.7.20/
[root@db02 ~]# chown -R mysql.mysql /service/mysql-5.7.20
[root@db02 ~]# systemctl start mysqld
[root@db02 ~]# mysql_upgrade
[root@db02 ~]# systemctl restart mysqld
[root@db02 ~]# mysql -e "select @@version;"
[root@db02 ~]# mysql -e "show databases"
标签:www size system div mamicode tar 升级 linu x86_64
原文地址:https://www.cnblogs.com/chenlifan/p/13882155.html