docker-compose.yml mysql
2021/12/17 19:50:06
本文主要是介绍docker-compose.yml mysql,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
这里写目录标题
- 1. docker-compose.yml mysql
- 1.1. tree
- 1.2. docker-compose.yml
- 1.3. restart5.sh
1. docker-compose.yml mysql
1.1. tree
|-- bak | `-- mysql | |-- conf.d | | |-- docker.cnf | | |-- mysql.cnf | | `-- mysqldump.cnf | |-- my.cnf -> /etc/alternatives/my.cnf | |-- my.cnf.fallback | |-- mysql.cnf | `-- mysql.conf.d | `-- mysqld.cnf |-- conf | |-- conf.d | | |-- docker.cnf | | |-- mysql.cnf | | `-- mysqldump.cnf | |-- my.cnf | |-- my.cnf.fallback | |-- mysql.cnf | `-- mysql.conf.d | `-- mysqld.cnf |-- docker-compose.yml `-- restart5.sh
1.2. docker-compose.yml
version: '2' services: mysql: container_name: "mysql5" network_mode: "bridge" environment: MYSQL_ROOT_PASSWORD: "1234@" image: "mysql:5" command: --default-authentication-plugin=mysql_native_password # restart: always volumes: - "/root/db5:/var/lib/mysql" - "/mnt/hgfs/share/docker-composes/mysql5/conf:/etc/mysql" - "/mnt/hgfs/share/docker-composes/mysql5/conf/my.cnf:/etc/my.cnf" ports: - "3306:3306" - "33060:33060"
1.3. restart5.sh
#/bin/sh docker stop mysql5 docker rm mysql5 docker-compose up -d docker ps -a
这篇关于docker-compose.yml mysql的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-15MySQL教程:初学者必备的MySQL数据库入门指南
- 2024-11-15MySQL教程:初学者必看的MySQL入门指南
- 2024-11-04部署MySQL集群项目实战:新手入门教程
- 2024-11-04如何部署MySQL集群资料:新手入门指南
- 2024-11-02MySQL集群项目实战:新手入门指南
- 2024-11-02初学者指南:部署MySQL集群资料
- 2024-11-01部署MySQL集群教程:新手入门指南
- 2024-11-01如何部署MySQL集群:新手入门教程