docker-compose安装mysql8
docker-compose.yml
version: '3' services: mysql: image: mysql:8 container_name: mysql8 ports: - 3306:3306 network_mode: "host" restart: always privileged: true volumes: - /home/mysql8/data:/var/lib/mysql - /home/mysql8/conf.d:/etc/mysql/conf.d command: --explicit_defaults_for_timestamp=true --lower_case_table_names=1 --max_allowed_packet=128M --default-authentication-plugin=mysql_native_password environment: - TZ=Asia/Shanghai - LANG=C.UTF-8 - MYSQL_ROOT_PASSWORD=root
-----------------------有任何问题可以在评论区评论,也可以私信我,我看到的话会进行回复,欢迎大家指教------------------------
(蓝奏云官网有些地址失效了,需要把请求地址lanzous改成lanzoux才可以)