debian9安装mysql

时间:2022-06-19 16:09:53
cd /tmp
wget https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb
dpkg -i mysql-apt-config_*.deb
选择5.7版本
apt update
apt install mysql-community-server -y
安装完成
登录mysql,设置允许远程连接
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
vim mysql.conf.d
将bind-address  = 127.0.0.1”改为“bind-address  = 0.0.0.0