docker安装 mysql
docker 安装 mysql
‘’’
docker 中下载 mysql
docker pull mysql
#启动
docker run –name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=Lzslov123! -d mysql
#进入容器
docker exec -it mysql bash
#登录mysql
mysql -u root -p
ALTER USER ‘root‘@’localhost’ IDENTIFIED BY ‘Lzslov123!’;
#添加远程登录用户
CREATE USER ‘liaozesong‘@’%’ IDENTIFIED WITH mysql_native_password BY ‘Lzslov123!’;
或者 CREATE USER ‘liaozesong‘@’%’ IDENTIFIED BY ‘Lzslov123!’;
GRANT ALL PRIVILEGES ON . TO ‘liaozesong‘@’%’;
‘’’
原文作者: 西瓜哥
原文链接: http://yoursite.com/2019/01/10/docker/
版权声明: 转载请注明出处(必须保留原文作者署名原文链接)