zoukankan      html  css  js  c++  java
  • Ubuntu16.04安装MySQL8.0

    1.Ubuntu换源(阿里云)

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
    sudo vi /etc/apt/sources.list
    • deb http://mirrors.aliyun.com/ubuntu/ xenial main multiverse restricted universe
    • deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main multiverse restricted universe
    • deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main multiverse restricted universe
    • deb http://mirrors.aliyun.com/ubuntu/ xenial-security main multiverse restricted universe
    • deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main multiverse restricted universe
    • deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main multiverse restricted universe
    • deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main multiverse restricted universe
    • deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main multiverse restricted universe
    • deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main multiverse restricted universe
    sudo apt update

    2.在MySQL官网下载mysql-apt-config_*.*.**-*_all.deb包

    https://dev.mysql.com/downloads/repo/apt/

    3、解包

    sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb

    选择默认,用方向键使框体选择确定,按enter键即可

    执行完成后,执行sudo apt update命令

    4、安装

    使用sudo apt install mysql-server命令,就会安装MySQL8.0

    中途会弹出对话框,输入密码即可,此密码即MySQL中root登录密码

    MySQL8.0采用了新的加密方式,一定要注意,正是因为这个加密方式才导致Ubuntu18.04用设置的root密码登录不了MySQL,因为Ubuntu18.04的终端可能有问题,并不支持这个新的加密方式。幸好有界面可以让我们选择使用旧版本5.x的加密方式,所以果断选择采用5.x的加密方式。

    随后等待安装完成即可

    mysql -uroot -p
  • 相关阅读:
    Python并发(一)
    Python协程详解(二)
    Python协程详解(一)
    Python装饰器
    ●BZOJ 3676 [Apio2014]回文串
    ●POJ 3974 Palindrome(Manacher)
    ●BZOJ 1692 [Usaco2007 Dec]队列变换
    ●BZOJ 4698 Sdoi2008 Sandy的卡片
    ●BZOJ 4516 [Sdoi2016]生成魔咒
    ●BZOJ 3238 [Ahoi2013]差异
  • 原文地址:https://www.cnblogs.com/anweilx/p/12200618.html
Copyright © 2011-2022 走看看