docker pull mysql:5.7
docker run -d \
--name mysql5.7 \
-p 3316:3306 \
-e MYSQL_ROOT_PASSWORD=11111111 \
mysql/mysql-server:5.7
允许使用IP登陆
docker exec -it mysql5.7 bash
mysql -uroot -p
update mysql.user set Host = '%' where User = 'root';
flush privileges;
网友评论