23
11/22
docker-compose通过容器名连接mysql
这是Mysql的配置: version :'3' services: desneyMysql: container_name: app_mysql image: mysql:5.7 build: context:./mysql ports: -"3307:3306" volumes: -./mysql/conf:/etc/mysql/conf.d -./mysql/logs:/logs -./mysql/data:/var/lib/mysql command:[ 'mysqld', '--innodb-buffer-pool-size=80M', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--default-time-zone=+8:00', '--lower-case-table-names=1' ] environment: MY...