赞
踩
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
在https://repo.mysql.com/下载mysql-apt-config_..**-*_all.deb包,我采用的是mysql-apt-config_0.8.14-1_all.deb。
sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb
无特殊需求,采用默认配置即可,直接通过上下键选择Ok
然后按Enter键,出现Ok即完成下载前的配置。
执行完成后,执行sudo apt-get update命令。
sudo apt install mysql-server
中途弹出对话框,输入密码,此密码即MySQL中root登录密码。,我这里设置为123456。
随后等待安装完成即可。
mysql -V
mysql -u root -p
密码是下载安装时设置的。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。