debain下mysql5.7安装
1. 首先输入mysql --version看有没有安装过其他版本的mysql,有的话卸载掉apt-get remove mysql-commonapt-get remove mysql*2. 下载包并解压升级sudo dpkg -i mysql-apt-config_0.8.9-1_all.debsudo apt-get update若更新过程中出现错误:EXPKEYS...
·
1. 首先输入mysql --version看有没有安装过其他版本的mysql,有的话卸载掉
apt-get remove mysql-common
apt-get remove mysql*
2. 下载包并解压升级
下载地址:https://repo.mysql.com//mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.9-1_all.deb
sudo apt-get update
若更新过程中出现错误:EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering
执行以下操作再次更新就OK
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5
sudo apt-get update
3. 安装mysql
sudo apt-get install mysql-server mysql-common
若是报如下错:
换成下面源(vi /etc/apt/sources.list),然后再apt-get update
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
再次执行安装 sudo apt-get install mysql-server mysql-common
4. 启动mysql5.7
service mysql start
5. 添加访问权限
vi /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
更多推荐
所有评论(0)