Skip to content

Commit

Permalink
MariaDB: docs update + repo move (docker-library#1880)
Browse files Browse the repository at this point in the history
* mariadb: update "What is MariaDB?"

Update description/license plege based on https://mariadb.org/about/

Update predominate users based on more recentl wikipedia links.

Drop-in compatibility is considered by many as overstepping the mark,
despite being moderately true, so limit the statement somewhat.

* mariadb: change hosting repository

* mariadb: replace logo

From https://mariadb.org/wp-content/uploads/2019/01/mariadb_org_rgb_v.png

* mariadb: reference JIRA for issues

* mariadb: content reference mariadb command line and docs

* mariadb: reference as MariaDB logs/configuration file

* mariadb: change README-short.txt

* mariadb: update maintainer

* mariadb: add get-help.md

* mariadb: *.sql.xz files initialization allowed

* mariadb: network naming from docker-library#1860
  • Loading branch information
grooverdan authored Feb 25, 2021
1 parent f0f5e79 commit fe985dc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion mariadb/README-short.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MariaDB is a community-developed fork of MySQL intended to remain free under the GNU GPL.
MariaDB Server is a high performing open source relational databases, forked from MySQL.
27 changes: 16 additions & 11 deletions mariadb/content.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# What is MariaDB?

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.
MariaDB Server is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, DBS Bank and ServiceNow.

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.

> [wikipedia.org/wiki/MariaDB](https://en.wikipedia.org/wiki/MariaDB)
The intent is also to maintain high compatibility with MySQL, ensuring a library binary equivalency and exact matching with MySQL APIs and commands. MariaDB developers continue to develop new features and improve performance to better serve its users.

%%LOGO%%

Expand All @@ -15,12 +13,19 @@ The intent is also to maintain high compatibility with MySQL, ensuring a "drop-i
Starting a MariaDB instance is simple:

```console
$ docker run --name some-%%REPO%% -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag
$ docker run --port 127.0.0.1:3306:3306 --name some-%%REPO%% -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag
```

or:

```console
$ docker network create some-network # Create the network
$ docker run --net some-network --name some-%%REPO%% -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag
```

... where `some-%%REPO%%` is the name you want to assign to your container, `my-secret-pw` is the password to be set for the MySQL root user and `tag` is the tag specifying the MySQL version you want. See the list above for relevant tags.
... where `some-network` is newly created network (other than `bridge` as the default network), `some-%%REPO%%` is the name you want to assign to your container, `my-secret-pw` is the password to be set for the MariaDB root user and `tag` is the tag specifying the MariaDB version you want. See the list above for relevant tags.

## Connect to MariaDB from the MySQL command line client
## Connect to MariaDB from the MySQL/MariaDB command line client

The following command starts another `%%IMAGE%%` container instance and runs the `mysql` command line client against your original `%%IMAGE%%` container, allowing you to execute SQL statements against your database instance:

Expand All @@ -36,13 +41,13 @@ This image can also be used as a client for non-Docker or remote instances:
$ docker run -it --rm %%IMAGE%% mysql -hsome.mysql.host -usome-mysql-user -p
```

More information about the MySQL command line client can be found in the [MySQL documentation](http://dev.mysql.com/doc/en/mysql.html)
More information about the MariaDB command line client can be found in the [MariaDB Knowledge Base](https://mariadb.com/kb/en/mysql-command-line-client/)

## %%STACK%%

Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).

## Container shell access and viewing MySQL logs
## Container shell access and viewing MariaDB logs

The `docker exec` command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your `%%IMAGE%%` container:

Expand All @@ -56,7 +61,7 @@ The log is available through Docker's container log:
$ docker logs some-%%REPO%%
```

## Using a custom MySQL configuration file
## Using a custom MariaDB configuration file

The startup configuration is specified in the file `/etc/mysql/my.cnf`, and that file in turn includes any files found in the `/etc/mysql/conf.d` directory that end with `.cnf`. Settings in files in this directory will augment and/or override settings in `/etc/mysql/my.cnf`. If you want to use a customized MySQL configuration, you can create your alternative configuration file in a directory on the host machine and then mount that directory location as `/etc/mysql/conf.d` inside the `%%IMAGE%%` container.

Expand Down Expand Up @@ -124,7 +129,7 @@ Currently, this is only supported for `MYSQL_ROOT_PASSWORD`, `MYSQL_ROOT_HOST`,

# Initializing a fresh instance

When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions `.sh`, `.sql` and `.sql.gz` that are found in `/docker-entrypoint-initdb.d`. Files will be executed in alphabetical order. You can easily populate your `%%IMAGE%%` services by [mounting a SQL dump into that directory](https://docs.docker.com/engine/tutorials/dockervolumes/#mount-a-host-file-as-a-data-volume) and provide [custom images](https://docs.docker.com/reference/builder/) with contributed data. SQL files will be imported by default to the database specified by the `MYSQL_DATABASE` variable.
When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions `.sh`, `.sql`, `.sql.gz`, and `.sql.xz` that are found in `/docker-entrypoint-initdb.d`. Files will be executed in alphabetical order. `.sh` files without file execute permission are sourced rather than executed. You can easily populate your `%%IMAGE%%` services by [mounting a SQL dump into that directory](https://docs.docker.com/engine/tutorials/dockervolumes/#mount-a-host-file-as-a-data-volume) and provide [custom images](https://docs.docker.com/reference/builder/) with contributed data. SQL files will be imported by default to the database specified by the `MYSQL_DATABASE` variable.

# Caveats

Expand Down
3 changes: 3 additions & 0 deletions mariadb/get-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Database Adminstrators (Stack Exchange)](https://dba.stackexchange.com/questions/tagged/docker+mariadb), [MariaDB Knowledge Base](https://mariadb.com/kb/en/docker-and-mariadb/) ([Ask a Question here](https://mariadb.com/kb/en/docker-and-mariadb/ask) available).

Also see the ["Getting Help with MariaDB" article on the MariaDB Knowledge Base](https://mariadb.com/kb/en/getting-help-with-mariadb/).
2 changes: 1 addition & 1 deletion mariadb/github-repo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/docker-library/mariadb
https://github.com/MariaDB/mariadb-docker
1 change: 1 addition & 0 deletions mariadb/issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[https://jira.mariadb.org/](https://jira.mariadb.org/) under "MDEV" Project, and component "Packaging" or [GitHub](%%GITHUB-REPO%%/issues)
Binary file modified mariadb/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion mariadb/maintainer.md

This file was deleted.

1 change: 1 addition & 0 deletions mariadb/maintainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[MariaDB developer community](%%GITHUB-REPO%%)

0 comments on commit fe985dc

Please sign in to comment.