Skip to content

Commit

Permalink
mariadb: using --port
Browse files Browse the repository at this point in the history
As mentioned in #2708 docs documenting how to change the port,
particular for host networking was requested.

The example in "configuration without a cnf file section" was
already the default anyway (utf8), so this was just replaced.

Using MARIADB_ROOT_PASSWORD in the example to move away from
MySQL naming (still supported however).

Closes: docker-library#2078
  • Loading branch information
grooverdan committed Nov 19, 2021
1 parent 589aa1e commit 897646e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mariadb/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ This will start a new container `some-%%REPO%%` where the MariaDB instance uses

### 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:
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 run on port 3808 just run the following:

```console
$ docker run --name some-%%REPO%% -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:latest --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
$ docker run --name some-%%REPO%% -e MARIADB_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:latest --port 3808
```

If you would like to see a complete list of available options, just run:
Expand Down

0 comments on commit 897646e

Please sign in to comment.