From 317f605b1c63e54493f084674b2d9509eb4f849f Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 24 Feb 2016 15:56:54 -0800 Subject: [PATCH] Add encoding hints for mysql, mariadb, and percona --- mariadb/content.md | 14 ++++++++++++++ mysql/content.md | 14 ++++++++++++++ percona/content.md | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/mariadb/content.md b/mariadb/content.md index 24042b9dfbcb..2c660d188bec 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -72,6 +72,20 @@ Note that users on host systems with SELinux enabled may see issues with this. T $ chcon -Rt svirt_sandbox_file_t /my/custom ``` +### Configuration without a `cnf` file + +Many configuration options can be passed as flags to `mysqld`. This will give you the flexibility to customize the container without needing a `cnf` file. For example, if you want to change the default encoding and collation for all tables to use UTF-8 (`utf8mb4`) just run the following: + +```console +$ docker run --name some-%%REPO%% -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%REPO%%:tag --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci +``` + +If you would like to see a complete list of available options, just run: + +```console +$ docker run -it --rm %%REPO%%:tag --verbose --help +``` + ## Environment Variables When you start the `%%REPO%%` image, you can adjust the configuration of the MariaDB instance by passing one or more environment variables on the `docker run` command line. Do note that none of the variables below will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup. diff --git a/mysql/content.md b/mysql/content.md index 88d4ab06dcf5..d65a1190635f 100644 --- a/mysql/content.md +++ b/mysql/content.md @@ -70,6 +70,20 @@ Note that users on host systems with SELinux enabled may see issues with this. T $ chcon -Rt svirt_sandbox_file_t /my/custom ``` +### Configuration without a `cnf` file + +Many configuration options can be passed as flags to `mysqld`. This will give you the flexibility to customize the container without needing a `cnf` file. For example, if you want to change the default encoding and collation for all tables to use UTF-8 (`utf8mb4`) just run the following: + +```console +$ docker run --name some-%%REPO%% -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%REPO%%:tag --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci +``` + +If you would like to see a complete list of available options, just run: + +```console +$ docker run -it --rm %%REPO%%:tag --verbose --help +``` + ## Environment Variables When you start the `%%REPO%%` image, you can adjust the configuration of the MySQL instance by passing one or more environment variables on the `docker run` command line. Do note that none of the variables below will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup. diff --git a/percona/content.md b/percona/content.md index 3fee904a204e..383e68a0b065 100644 --- a/percona/content.md +++ b/percona/content.md @@ -72,6 +72,20 @@ Note that users on host systems with SELinux enabled may see issues with this. T $ chcon -Rt svirt_sandbox_file_t /my/custom ``` +### Configuration without a `cnf` file + +Many configuration options can be passed as flags to `mysqld`. This will give you the flexibility to customize the container without needing a `cnf` file. For example, if you want to change the default encoding and collation for all tables to use UTF-8 (`utf8mb4`) just run the following: + +```console +$ docker run --name some-%%REPO%% -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%REPO%%:tag --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci +``` + +If you would like to see a complete list of available options, just run: + +```console +$ docker run -it --rm %%REPO%%:tag --verbose --help +``` + ## Environment Variables When you start the `%%REPO%%` image, you can adjust the configuration of the Percona instance by passing one or more environment variables on the `docker run` command line. Do note that none of the variables below will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup.