docker-compose 配置 mysql

docker-compose.yml

version: '3.7'
services:
    mysql:
        container_name: v-mysql
        image: mysql:5.7.28
        environment:
            MYSQL_DATABASE: cms_linbaby
            MYSQL_ROOT_PASSWORD: 'password'
            MYSQL_ROOT_HOST: '%'
            MYSQL_USER: 'dev'
            MYSQL_PASS: 'password'
            MYSQL_HOST: '%'
        ports:
            - "3377:3306"
        restart: always