ubuntu15.10, ubuntu14.04 安装MySQL5.7
sudo cp /etc/apt/sources.list /etc/apt/sources.list-bk
vim /etc/apt/ sources.list
修改为:
deb http://mirrors.aliyun.com/ubuntu/trusty main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/trusty-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/trusty-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/trusty-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/trusty-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/trusty main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/trusty-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/trusty-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/trusty-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/trusty-updates main multiverse restricted universe
sudo apt-get update
地址:https://dev.mysql.com/downloads/mysql/
下载与系统对应的安装包,目前15.10的安装包消失了,列表中找不到,如果是ubuntu15.10的话,下载14.04也可以。
先进入到下载文件的目录
tar -xvf mysql-server_5.7.20-1ubuntu14.04_amd64.deb-bundle.tar
# 注,这里的文件名以你下载的为准
sudo apt-get upgrade
sudo apt-get install libaio1
因为有依赖关系,所以请按照顺序安装
dpkg -i mysql-common_5.7.20-1ubuntu14.04_amd64.deb
dpkg -i libmysqlclient20_5.7.20-1ubuntu14.04_amd64.deb
dpkg -i libmysqlclient-dev_5.7.20-1ubuntu14.04_amd64.deb
dpkg -i libmysqld-dev_5.7.20-1ubuntu14.04_amd64.deb
dpkg -i mysql-community-client_5.7.20-1ubuntu14.04_amd64.deb
dpkg -i mysql-client_5.7.20-1ubuntu14.04_amd64.deb
dpkg -i mysql-community-source_5.7.20-1ubuntu14.04_amd64.deb
sudo apt-get -f install
dpkg -i mysql-community-server_5.7.17-1ubuntu14.04_amd64.deb
剩下的就是一直选择ok,然后输入密码什么的了。安装完成后就可以了。
viencoding.com版权所有,允许转载,但转载请注明出处和原文链接: https://viencoding.com/article/81