docker tomcat容器 mysql必须部署在docker上吗?

docker tomcat容器 mysql必须部署在docker上吗


千万里不及你
浏览 1042回答 1
1回答

侃侃尔雅

1 docker pull mysql2 docker run -v /data/var/mysql/:/var/lib/mysql -e YSQL_ROOT_PASSWORD=kS4pJUIb mysql3 docker stop [CONTAINER ID]4 docker run -it -v /data/var/mysql/:/var/lib/mysql mysql /bin/bash5 mysqld_safe&6 grant all privileges on *.* to 'wuxiao'@'%' identified by 'password';7 docker cp [CONTAINER ID]:/etc/mysql/my.cnf /data/local/my.cnf8 docker stop [CONTAINER ID]
打开App,查看更多内容
随时随地看视频慕课网APP