Error changing password (MYSQL_ROOT_PASSWORD) in MySQL docker.compose.yml file

1

I recently had to change the administrator password for my database (I currently use MySQL), I changed the password 'MYSQL_ROOT_PASSWORD' but it did not reflect changes in my container. I have already tried to delete, build and try a forced refresh. But nothing worked.

# arquivo docker-compose.yml
version: "2"
services:
    www:
        build: .
        ports:
            - "8001:80"
        volumes:
            - ./www:/var/www/html/
        links:
            - db
        networks:
            - default
    db:
        image: mysql:5.6
        ports:
            - "3306:3306"
        environment:
            MYSQL_DATABASE: lista
            MYSQL_USER: root
            MYSQL_PASSWORD: 123
            MYSQL_ROOT_PASSWORD: 123
        volumes:
            - ./bd:/docker-entrypoint-initdb.d
            - persistent:/var/lib/mysql
        restart: always
        networks:
            - default
    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        links:
            - db:db
        ports:
            - 8000:80
        environment:
            MYSQL_USER: root
            MYSQL_PASSWORD: 123
            MYSQL_ROOT_PASSWORD: 123
volumes:
    persistent:
    
asked by anonymous 16.03.2018 / 14:15

0 answers