zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    js在html中的加载执行顺序
    Smarty 模板引擎 fetch()和display()函数的区别?
    exit() die return 的区别
    (git fetch git push git pull)远程本地分支互相推送更新
    Echop后台分页实现原理详解
    location对象位置操作,进行跳转
    history对象属性和方法
    location对象,将url解析为独立片段search属性截取传递的参数
    frame与iframe的区别?
    页面弹出新图层,新图层处理完后,怎么实现原页面刷新
  • 原文地址:https://www.cnblogs.com/xiao0913/p/5199002.html
Copyright © 2011-2022 走看看