docker-library/docs — pull request #109 by yosifkit (2014-11-25 18:24:00+00:00)
Title: MariaDB docs

Here is a pretty diff: (also, need to merge a PR to official-images first so that supported tags gets filled in)
```diff
$ diff -Nru mysql/content.md mariadb/content.md
--- mysql/content.md	2014-11-20 16:40:19.046288665 -0800
+++ mariadb/content.md	2014-11-25 09:56:23.586487460 -0800
@@ -1,56 +1,60 @@
-# What is MySQL?
+# What is MariaDB?

-MySQL is (as of March 2014) the world's second most widely used open-source
-relational database management system (RDBMS). It is named after co-founder
-Michael Widenius's daughter, My. The SQL phrase stands for Structured Query
-Language.
-
-MySQL is a popular choice of database for use in web applications, and is a
-central component of the widely used LAMP open source web application software
-stack (and other 'AMP' stacks). LAMP is an acronym for "Linux, Apache, MySQL,
-Perl/PHP/Python." Free-software-open source projects that require a
-full-featured database management system often use MySQL.
+MariaDB is a community-developed fork of the MySQL relational database
+management system intended to remain free under the GNU GPL. Being a fork of a
+leading open source software system, it is notable for being led by the original
+developers of MySQL, who forked it due to concerns over its acquisition by
+Oracle. Contributors are required to share their copyright with the MariaDB
+Foundation.
+
+The intent is also to maintain high compatibility with MySQL, ensuring a
+"drop-in" replacement capability with library binary equivalency and exact
+matching with MySQL APIs and commands. It includes the XtraDB storage engine for
+replacing InnoDB, as well as a new storage engine, Aria, that intends to be both
+a transactional and non-transactional engine perhaps even included in future
+versions of MySQL.

-Oracle Corporation and/or affiliates own the copyright and trademark for MySQL.
-
-> [wikipedia.org/wiki/MySQL](https://en.wikipedia.org/wiki/MySQL)
+> [wikipedia.org/wiki/MariaDB](https://en.wikipedia.org/wiki/MariaDB)

%%LOGO%%

# How to use this image

-## start a mysql instance
+## start a mariadb instance

- docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql
+ docker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mariadb

-This image includes `EXPOSE 3306` (the mysql port), so standard container
-linking will make it automatically available to the linked containers (as the
-following examples illustrate).
+This image includes `EXPOSE 3306` (the mysql/mariadb port), so standard
+container linking will make it automatically available to the linked containers
+(as the following examples illustrate).

## connect to it from an application

- docker run --name some-app --link some-mysql:mysql -d application-that-uses-mysql
+Since MariaDB is intended as a drop-in replacement for MySQL, it can be used
+with many applications.
+
+ docker run --name some-app --link some-mariadb:mysql -d application-that-uses-mysql

## ... or via `mysql`

- docker run -it --link some-mysql:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
+ docker run -it --link some-mariadb:mysql --rm mariadb sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'

## Environment Variables

-The MySQL image uses several environment variables which are easy to miss. While
+The MariaDB image uses several environment variables which are easy to miss. While
not all the variables are required, they may significantly aid you in using the
-image.
+image. The variables use "MYSQL" since the MariaDB binary is `mysqld`.

### `MYSQL_ROOT_PASSWORD`

-This is the one environment variable that is required for you to use the MySQL
+This is the one environment variable that is required for you to use the MariaDB
image. This environment variable should be what you want to set the root
-password for MySQL to. In the above example, it is being set to
+password for MariaDB to. In the above example, it is being set to
"mysecretpassword".

### `MYSQL_USER`, `MYSQL_PASSWORD`

-These optional environment variables are used in conjunction to set both a MySQL
+These optional environment variables are used in conjunction to set both a MariaDB
user and password, which will subsequently be granted all permissions for the
database specified by the optional `MYSQL_DATABASE` variable. Note that if you
only have one of these two environment variables, then neither will actually do
@@ -65,8 +69,8 @@

# Caveats

-If there is no database when `mysql` starts in a container, then `mysql` will
+If there is no database when `mariadb` starts in a container, then `mariadb` will
create the default database for you. While this is the expected behavior of
-`mysql`, this means that it will not accept incoming connections during that
+`mariadb`, this means that it will not accept incoming connections during that
time. This may cause issues when using automation tools, such as `fig`, that
start several containers simultaneously.
```