Skip to content

Unable to perform database dump #131

@guereeno

Description

@guereeno

Hi,
I need to dump the database and I'm tryng with the following command:

# docker exec -it mariadb mysqldump -u root -p'redactedpassword' glpidb > glpi_backup.sql

and I get an invali credential error inside the generated file:

mysqldump: Got error: 1045: "Access denied for user 'root'@'localhost' (using password: YES)" when trying to connect

Of course the credentials have been changed from the defaults during first deploy.
Here is my docker-compose.yml file:

 services:
    mariadb:
         image: mariadb:10.7
         container_name: mariadb
         hostname: mariadb
         volumes:
             - ./var/lib/mysql:/var/lib/mysql
             - /etc/timezone:/etc/timezone:ro
             - /etc/localtime:/etc/localtime:ro
         environment:
             - MARIADB_ROOT_PASSWORD='redacted'
             - MARIADB_DATABASE=glpidb
             - MARIADB_USER=glpi_user
             - MARIADB_PASSWORD='redacted'
             - MARIADB_AUTO_UPGRADE='1'
             - TIMEZONE=Europe/Rome
         restart: always
        
    glpi:
       image: diouxx/glpi:latest
       container_name : glpi
       hostname: glpi
       ports:
           - "80:80"
       volumes:
           - /etc/timezone:/etc/timezone:ro
           - /etc/localtime:/etc/localtime:ro
           - /var/www/html/glpi/:/var/www/html/glpi
       environment:
           - TIMEZONE=Europe/Rome
       restart: always

 networks:
   default:
     external: true
     name: glpi-docker-net

I wander if this happens because the credential have been changed a couple of times inside the docker-compose.yml file after the first deployment?
Thanks in advance for any given help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions