docker 安装 mysql(arm64)
version: '3.1'
services:
db:
image: mysql/mysql-server:8.0.22-1.1.18
restart: always
container_name: mysql
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=123456
command:
--default-authentication-plugin=mysql_native_password
--sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=0
ports:
- 3306:3306
volumes:
- ./data:/var/lib/mysql
version: '3.1'
services:
db:
image: biarms/mysql:5.7.30-linux-arm64v8
restart: always
container_name: mysql
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=123456
command:
--default-authentication-plugin=mysql_native_password
--sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=0
ports:
- 3306:3306
volumes:
- /etc/my.cnf:/etc/mysql/my.cnf
- ./data:/var/lib/mysql