docker search mysql //查找mysql镜像
docker pull mysql //拉取镜像(docker pull mysql:5.7 指定版本号)
docker run -itd --net=host --name mysql -e MYSQL_ROOT_PASSWORD=root mysql //创建容器, 主机网络模式
docker exec -it mysql /bin/bash //登录容器
mysql -u root -p //登录mysql
GRANT ALL ON *.* TO 'root'@'%';
flush privileges;
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
flush privileges;