Administrator
发布于 2024-08-02 / 8 阅读
0
0

MySQL5.7.19小版本升级到5.7.43或者5.7.44

环境:Centos7、rpm方式

官方资源下载:mysql5.7.43mysql5.7.44

  1. 查看当前服务器安装的MySQL版本

    [root@s-zw-db-mysql-test ~]# rpm -qa|grep mysql
    mysql-community-common-5.7.19-1.el7.x86_64
    mysql-community-client-5.7.19-1.el7.x86_64
    mysql-community-libs-compat-5.7.19-1.el7.x86_64
    mysql57-community-release-el7-9.noarch
    mysql-community-libs-5.7.19-1.el7.x86_64
    mysql-community-server-5.7.19-1.el7.x86_64
  2. 停止MySQL服务

    [root@s-zw-db-mysql-test ~]# systemctl stop mysqld
  3. 上传mysql5.7.43压缩包到服务器并解压

    [root@s-zw-db-mysql-test ~]# tar -xvf mysql-5.7.43-1.el7.x86_64.rpm-bundle.tar
  4. 在解压后的文件夹中,执行升级命令

    [root@s-zw-db-mysql-test ~]# rpm -Uvh mysql-community-server-5.7.43-1.el7.x86_64.rpm  --force --nodeps
    [root@s-zw-db-mysql-test ~]# rpm -Uvh mysql-community-libs-5.7.43-1.el7.x86_64.rpm --force --nodeps
    [root@s-zw-db-mysql-test ~]# rpm -Uvh mysql-community-common-5.7.43-1.el7.x86_64.rpm --force --nodeps
    [root@s-zw-db-mysql-test ~]# rpm -Uvh mysql-community-client-5.7.43-1.el7.x86_64.rpm --force --nodeps
  5. 启动mysql服务

    [root@s-zw-db-mysql-test ~]# systemctl start mysqld
  6. 链接数据库查看版本

    [root@s-zw-db-mysql-test ~]# mysql -uhlwjzwfw -p
    Enter password: 
    
    mysql> select version();
    +------------+
    | version()  |
    +------------+
    | 5.7.43     |
    +------------+
    1 row in set (0.00 sec)


评论