• Linux安装指定mysql版本


    每个版本可能不一样:
    测试是Ubuntu 14.04版本,mysql5.7.10
    官网下载wget -c http://downloads.mysql.com/archives/get/file/mysql-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar
    tar -xvf ***deb-bundle.tar 大概有10+个deb包

    官网顺序http://dev.mysql.com/doc/refman/5.7/en/linux-installation-debian.html
    tar -xvf mysql-server_MVER-DVER_CPU.deb-bundle.tar
    sudo apt-get install libaio1
    sudo dpkg-preconfigure mysql-community-server_*.deb
    sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb

    还敲了一阵sudo apt search libaio 和sudo apt install libaio1指令
    后来执行sudo apt-get -f install 解决

    回退5.7到5.6.21的重装过程
    删除 mysql
    sudo apt-get autoremove --purge mysql-server
    sudo apt-get remove mysql-server
    sudo apt-get autoremove mysql-server
    sudo apt-get autoremove mysql-common
    清理残留数据
    dpkg -l |grep ^rc|awk '{print $2}' |grep mysql | sudo xargs dpkg -P

    重装mysql,官网文档上的顺序
    tar -xvf mysql-server_MVER-DVER_CPU.deb-bundle.tar
    sudo apt-get install libaio1
    sudo dpkg -i mysql-common_MVER-DVER_CPU.deb
    sudo dpkg-preconfigure mysql-community-server_MVER-DVER_CPU.deb
    sudo dpkg -i mysql-community-server_MVER-DVER_CPU.deb
    sudo dpkg -i mysql-community-client_MVER-DVER_CPU.deb
    sudo dpkg -i libmysqlclient18_MVER-DVER_CPU.deb

    =========================================================
    sudo /etc/init.d/mysql start 服务启动
    sudo /etc/init.d/mysql stop

    使用户可以从其它地址可以访问服务器
    首先得修改/etc/mysql/my.cnf文件,将bind-address = 127.0.0.1修改为 0.0.0.0
    并赋予其访问权限grant all on *.* to root@'%' identified by "passwd"; flush privileges;

    升级过程中error用:mysql_upgrade mysql -h127.0.0.1 -uroot -p123456

    ==============Ubuntu 18.04.4 LTS ---> mysql-server_5.7.32-1ubuntu18.04_amd64.deb-bundle.tar

    7za x mysql-server_5.7.32-1ubuntu18.04_amd64.deb-bundle.zip
    apt-get install libaio1
    apt-get install libmecab2
    dpkg-preconfigure mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb
    dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb

  • 相关阅读:
    关于document.body.scrollTop用法
    set回顾
    用户登录与注册
    编写通讯录2
    利用字典的特性编写一个通讯录
    shelve模块
    shutil模块
    列表的拓展
    随机生成验证码2
    递归与欧几里得算法结合求最大公约数
  • 原文地址:https://www.cnblogs.com/xiao0913/p/5199002.html
Copyright © 2020-2023  润新知