MySQL官网下载地址
选择系统版本Ubuntu14.04后缀名为deb_bundle.tar的进行下载
Ubuntu Linux 14.04 (x86, 64-bit), DEB Bundle MySQL Server 5.7.x 237.6M(此处x即为mysql的最新版)
本文以mysql5.7.10为示例
(文件名为:mysql-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar)
放在 /usr/local/src 下解压:
mv /home/"当前登陆的用户名"/"安装包的下载路径"/mysql-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar /usr/local/src(引号中的路径请自行修改)
cd /usr/local/src
sudo chmod +x mysql-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar
tar -xf mysql-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar
libmysqlclient20_5.7.10-1ubuntu14.04_amd64.deb
libmysqlclient-dev_5.7.10-1ubuntu14.04_amd64.deb
libmysqld-dev_5.7.10-1ubuntu14.04_amd64.deb
mysql-client_5.7.10-1ubuntu14.04_amd64.deb
mysql-common_5.7.10-1ubuntu14.04_amd64.deb
mysql-community-client_5.7.10-1ubuntu14.04_amd64.deb
mysql-community-server_5.7.10-1ubuntu14.04_amd64.deb
mysql-community-source_5.7.10-1ubuntu14.04_amd64.deb
mysql-community-test_5.7.10-1ubuntu14.04_amd64.deb
mysql-server_5.7.10-1ubuntu14.04_amd64.deb
mysql-testsuite_5.7.10-1ubuntu14.04_amd64.deb
mysql-community_5.7.10-1ubuntu14.04_amd64.changes
(可以ls查看一下)
sudo apt-get update
sudo apt-get upgrade
apt-get install libaio1
sudo dpkg -i mysql-common_5.7.10-1ubuntu14.04_amd64.deb
sudo dpkg-preconfigure mysql-community-server_5.7.10-1ubuntu14.04_amd64.deb
此步需要输入数据的root密码
sudo dpkg -i libmysqlclient20_5.7.10-1ubuntu14.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_5.7.10-1ubuntu14.04_amd64.deb
sudo dpkg -i libmysqld-dev_5.7.10-1ubuntu14.04_amd64.deb
sudo dpkg -i mysql-community-client_5.7.10-1ubuntu14.04_amd64.deb
sudo dpkg -i mysql-client_5.7.10-1ubuntu14.04_amd64.deb
sudo dpkg -i mysql-common_5.7.10-1ubuntu14.04_amd64.deb
sudo apt-get -f install
sudo apt-get -f install libmecab2
sudo dpkg -i mysql-community-server_5.7.9-1ubuntu14.04_amd64.deb
sudo dpkg -i mysql-server_5.7.9-1ubuntu14.04_amd64.deb
mysql -u root -p
输入之前设置的帐户密码