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

mysql_install_db.sh features for docker container

    XMLWordPrintable

Details

    Description

      The docker entrypoint for containers does too much work
      https://github.com/docker-library/mariadb/blob/master/docker-entrypoint.sh

      The lack of options in mysql_install_db.sh means that the server is restarted several times within a container on initialization.

      Unlike the standard model of database deployment where initialization is a rare event, with containers this is now a frequent and time critical function.

      aspect to be improve are under these functions

      docker_init_database_dir

      currently calls mysql_install_db and sets user to normal.

      docker_setup_db

      mysql_tzinfo_to_sql - removing prepared statement this could be part of mysql_install_db
      (aka mysqld --bootstrap).

      Support the following root creattion options:

      • MYSQL_RANDOM_ROOT_PASSWORD (32 character upper/lower/number random password)
      • MYSQL_ROOT_HOST host component for the user
      • MYSQL_ROOT_PASSWORD

      note: password needs to be saved somehow.

      Skip test database creation (backport from 10.2) - 9a8498066865 (limited) + scripts/mysql_test_db.sql + sql/*

      Additional user:

      • MYSQL_USER
      • MYSQL_PASSWORD
      • MYSQL_DATABASE

      docker_process_init_files

      probably need to remain a separate start of mysqld out of bootstrap mode.

      to assist in merging upwards without fault

      47334649752e (part of 1st hunk of mysql_install._db.sh)

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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