• mysql5.5升级至5.7 或升级至8.0


    卸载旧版本mysql

    当然要记得备份数据库数据

    1.查看需要卸载的部分:

    rpm -qa |grep -i mysql

    2.开始卸载:

    yum remove mysql*

    接下来是安装新版mysql

    1.下载并安装源:

    wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
    yum localinstall mysql57-community-release-el7-7.noarch.rpm
    ##升级到mysql8
    wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
    yum -y localinstall mysql80-community-release-el7-3.noarch.rpm 

    相关地址:https://dev.mysql.com/downloads/repo/yum/

    右键复制链接 wget 请求

    2.开始安装:

    yum install -y mysql-server
    mysql8 使用:
    yum install mysql-community-server

    3.安装完成并确认版本:

    mysql -V

    4.接下来就去恢复数据库数据吧.

    重启数据库

    systemctl restart mysqld

    可能会遇到的问题:

    Can't connect to local MySQL server through socket '/data/db/mariadb/mysql.sock (找不到mysql.sock)

    find / -name mysql.sock 

    通过find找不到相关文件时直接重启试试

    查看初始化密码:

    cat /var/log/mysqld.log  | grep password

     

  • 相关阅读:
    TOYS POJ
    口罩发放
    Qin Shi Huang's National Road System HDU
    次小生成树
    ACM Contest and Blackout UVA
    Strongly connected HDU
    tarjan
    Network HDU
    【洛谷 1351】联合权值
    【洛谷 3884】二叉树问题
  • 原文地址:https://www.cnblogs.com/l-zl/p/13803595.html
Copyright © 2020-2023  润新知