[MDEV-23494] mysql_install_db.sh features for docker container Created: 2020-08-17  Updated: 2023-10-12

Status: Open
Project: MariaDB Server
Component/s: Scripts & Clients
Fix Version/s: None

Type: Task Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-24268 mtr tests for mysql_install_db Open

 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)



 Comments   
Comment by Ralf Gebhardt [ 2023-10-12 ]

I have removed the fixVersion for this task as it is one of 5.5, 10.1, 10.2, 10.3, which are EOLed.

Please add a new fixVersion if you plan to work on this task for a not EOLed versions.

Generated at Thu Feb 08 09:22:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.