docker tomcat容器 mysql必须部署在docker上吗
1 回答
侃侃尔雅
TA贡献1801条经验 获得超16个赞
1 docker pull mysql
2 docker run -v /data/var/mysql/:/var/lib/mysql -e YSQL_ROOT_PASSWORD=kS4pJUIb mysql
3 docker stop [CONTAINER ID]
4 docker run -it -v /data/var/mysql/:/var/lib/mysql mysql /bin/bash
5 mysqld_safe&
6 grant all privileges on *.* to 'wuxiao'@'%' identified by 'password';
7 docker cp [CONTAINER ID]:/etc/mysql/my.cnf /data/local/my.cnf
8 docker stop [CONTAINER ID]
- 1 回答
- 0 关注
- 1041 浏览
添加回答
举报
0/150
提交
取消