1. mysql开启远程登录

1
2
3
4
5
6
#删除之前配置
drop user 'root'@'%';
#配置远程登录
CREATE USER 'root'@'%' IDENTIFIED BY '123456';
GRANT ALL ON *.* TO 'root'@'%';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '12345';

2.刷新权限

1
2
3
FLUSH PRIVILEGES;
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo