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
  • 相关阅读:
    Ch6 信号和信号处理
    Ch13 TCP/IP和网络编程
    Ch14学习笔记——MySQL数据库系统
    电子公文传输系统个人贡献
    实验四 Web服务器2
    Ch12 块设备I/O和缓冲区管理
    实验四 Web服务器1socket编程
    定时器及时钟服务
    Computer.Science.Illuminated.7th.CN.计算机科学概论——配图
    ROS/ROS2
  • 原文地址:https://www.cnblogs.com/anweilx/p/12200618.html
Copyright © 2011-2022 走看看