mysql5.6.3x 升级 mysql5.7.23

下载mysql5.7.23

cd /home

wget http://ftp.ntu.edu.tw/pub/MySQL/Downloads/MySQL-5.7/mysql-5.7.23-1.el6.x86_64.rpm-bundle.tar

先关掉mysql

service mysql stop

检查当前安装的mysql

rpm -qa |grep -i mysql

卸载掉已安装的mysql

yum remove MySQL-client MySQL-server MySQL-devel MySQL-shared MySQL-shared-compat

安装mysql5.7.23

tar -xvf mysql-5.7.23-1.el6.x86_64.rpm-bundle.tar

rpm -ivh mysql-community-common-5.7.23-1.el6.x86_64.rpm

rpm -ivh mysql-community-libs-5.7.23-1.el6.x86_64.rpm

rpm -ivh mysql-community-client-5.7.23-1.el6.x86_64.rpm

rpm -ivh mysql-community-server-5.7.23-1.el6.x86_64.rpm

安装好的密码也是在 cat /root/.mysql_secret 里

注意:卸载升级的时候,用的还是老密码

查看新版本

mysql -V

启动mysql,并升级(假设密码是123456)

service mysqld start

mysql_upgrade -uroot -p123456

service mysqld restart

    原文作者:星门小嗝嗝
    原文地址: https://www.jianshu.com/p/64ba38cdfeb0
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞