Error when execute "docker-compose up"

Hello there,

I have 2 errors when executing “docker-compose up”

docker-databaseimportexport-1 | ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for ‘s.je’@‘%’
docker-databaseimportexport-1 | ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for ‘student’@‘%’

Does someone already had this problem and found the solution ?

Thanks

Can you please post the full docker-compose.yaml you’re using?

Hello,

it tell me that as new user I can’t upload file here, I paste all the code under there … sorry for that…

version: '3.8'
services:
    updatecerts:
        image: vjedev/certupdater:latest
        volumes:
            - certs:/certs
            - mysqlconf:/mysqlconf
    landingpage:
        image: vjedev/landingpage:latest
        volumes:
            - ./websites:/websites
    databaseimportexport:
        image: vjedev/database-import-export:latest
        volumes:
            - ./websites:/websites
        depends_on:
            - mysql
    web:
        image: nginx:latest
        ports:
            - "90:90"
            - "443:443"
        volumes:
            - ./nginx.conf:/etc/nginx/conf.d/nginx.conf
            - certs:/certs
            - ./websites:/websites
        depends_on:
            - updatecerts
    php:
        build:
            context: .
            dockerfile: PHP.Dockerfile
        volumes:
            - ./websites:/websites
    mysql:
        image: mariadb:latest
        environment:
            MYSQL_ROOT_PASSWORD: 'v.je'
            MYSQL_USER: 'v.je'
            MYSQL_PASSWORD: 'v.je'
        volumes:
            - mysqldata:/var/lib/mysql
            - certs:/ssl
            - mysqlconf:/etc/mysql/conf.d/
        ports:
            - 3306:3306
    phpunit:
        image: phpunit/phpunit:latest
        working_dir: /websites/default
        volumes:
            - ./websites:/websites
        profiles:
            - phpunit
    composer:
        image: composer:latest
        working_dir: /websites/default
        volumes:
            - ./websites:/websites
        profiles:
            - composer
    maildev:
        image: maildev/maildev:latest

volumes:
    mysqldata: {}
    certs: {}
    mysqlconf: {}

I’m thinking the application isn’t using the MySQL password you’ve provided and hence you get the error. Can you try using the password the book suggests you use?

thanks for you answer, but I searched in all the chapter 1 of the book but I can’t find any suggest of password, can you enlighten me ?
Just to precise I didn’t touched anything but the 80 port in the docker-compose.yaml . I changed the 80 port because I had the 80 already used.

I tried to access https://v.je/ and it works even the powershell stay stuck avec the 2 lines of error

If it works then it would seem you don’t need the vjedev/database-import-export container at the moment.

For now I would just ignore the error if I were you until you find something in the database appears to be missing.

I will do with it for now ^^

Thank you for your help ! :slight_smile: And have a nice day !

1 Like