Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22201

Docker Compose does not set root password for new container

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 10.4
    • N/A
    • OTHER
    • Ubuntu 18.04.3 LTS
      Docker version 19.03.8, build afacb8b7f0

    Description

      When passing MYSQL_ROOT_PASSWORD as an environment variable as shown here: https://hub.docker.com/_/mariadb?tab=description the container is created without a root password:

      root@demo30-ourcompose-com--2020-04-09-02-10:~# docker inspect root_db_1
      []
      Error: No such object: root_db_1
      root@demo30-ourcompose-com--2020-04-09-02-10:~# cat stack.yml 
      # Use root/example as user/password credentials
      version: '3.6'
      services:
        db:
          image: "mariadb:10.4"
          restart: always
          environment:
              MYSQL_ROOT_PASSWORD: "quEfaBHnAFmad7Fs"
      root@demo30-ourcompose-com--2020-04-09-02-10:~# docker-compose -f stack.yml up | grep 'PLEASE REMEMBER' -A 20
      Creating root_db_1 ... done
      db_1  | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
      db_1  | To do so, start the server, then issue the following commands:
      db_1  | 
      db_1  | '/usr/bin/mysqladmin' -u root password 'new-password'
      db_1  | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
      db_1  | 
      db_1  | Alternatively you can run:
      db_1  | '/usr/bin/mysql_secure_installation'
      db_1  | 
      db_1  | which will also give you the option of removing the test
      db_1  | databases and anonymous user created by default.  This is
      db_1  | strongly recommended for production servers.
      db_1  | 
      db_1  | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
      db_1  | MySQL manual for more instructions.
      db_1  | 
      db_1  | Please report any problems at http://mariadb.org/jira
      db_1  | 
      db_1  | The latest information about MariaDB is available at http://mariadb.org/.
      db_1  | You can find additional information about the MySQL part at:
      db_1  | http://dev.mysql.com
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrewcz AndrewCz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.