You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring :-
9
4
10
-
The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at:
11
-
*[forum.linuxserver.io][forumurl]
12
-
*[IRC][ircurl] on freenode at `#linuxserver.io`
13
-
*[Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
5
+
* regular and timely application updates
6
+
* easy user mappings (PGID, PUID)
7
+
* custom base image with s6 overlay
8
+
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
9
+
* regular security updates
14
10
15
-
# linuxserver/mariadb
16
-
[](https://microbadger.com/images/linuxserver/mariadb"Get your own version badge on microbadger.com")[](https://microbadger.com/images/linuxserver/mariadb"Get your own image badge on microbadger.com")[][hub][][hub][](https://ci.linuxserver.io/job/Docker-Builders/job/x86-64/job/x86-64-mariadb/)
11
+
Find us at:
12
+
*[Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
13
+
*[IRC](https://irc.linuxserver.io) - on freenode at `#linuxserver.io`. Our primary support channel is Discord.
14
+
*[Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
15
+
*[Podcast](https://anchor.fm/linuxserverio) - on hiatus. Coming back soon (late 2018).
17
16
18
-
One of the most popular database servers. Made by the original developers of MySQL
17
+
# PSA: Changes are happening
18
+
19
+
From August 2018 onwards, Linuxserver are in the midst of switching to a new CI platform which will enable us to build and release multiple architectures under a single repo. To this end, existing images for `arm64` and `armhf` builds are being deprecated. They are replaced by a manifest file in each container which automatically pulls the correct image for your architecture. You'll also be able to pull based on a specific architecture tag.
20
+
21
+
TLDR: Multi-arch support is changing from multiple repos to one repo per container image.
[](https://microbadger.com/images/linuxserver/mariadb"Get your own version badge on microbadger.com")
26
+
[](https://microbadger.com/images/linuxserver/mariadb"Get your own version badge on microbadger.com")
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list).
39
+
40
+
Simply pulling `linuxserver/mariadb` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
Here are some example snippets to help you get started creating a container.
54
+
55
+
### docker
56
+
24
57
```
25
58
docker create \
26
-
--name=mariadb \
27
-
-p 3306:3306 \
28
-
-e PUID=<UID> \
29
-
-e PGID=<GID> \
30
-
-e MYSQL_ROOT_PASSWORD=<DATABASE PASSWORD> \
31
-
-e TZ=<timezone> \
32
-
-v </path/to/appdata>:/config \
33
-
linuxserver/mariadb
59
+
--name=mariadb \
60
+
-e PUID=1001 \
61
+
-e PGID=1001 \
62
+
-e MYSQL_ROOT_PASSWORD=<DATABASE PASSWORD> \
63
+
-e TZ=Europe/London \
64
+
-p 3306:3306 \
65
+
-v <path to data>:/config \
66
+
--restart unless-stopped \
67
+
linuxserver/mariadb
34
68
```
35
69
36
-
## Parameters
37
70
38
-
`The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
39
-
For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container.
40
-
So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080
41
-
http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.`
71
+
### docker-compose
42
72
73
+
Compatible with docker-compose v2 schemas.
43
74
44
-
*`-p 3306` - mysql port
45
-
*`-v /config` - Contains the db itself and all assorted settings.
46
-
*`-e MYSQL_ROOT_PASSWORD` - set this to root password for installation (minimum 4 characters)
47
-
*`-e PGID` for GroupID - see below for explanation
48
-
*`-e PUID` for UserID - see below for explanation
49
-
*`-e TZ` - for timezone information *eg Europe/London, etc*
75
+
```
76
+
---
77
+
version: "2"
78
+
services:
79
+
mariadb:
80
+
image: linuxserver/mariadb
81
+
container_name: mariadb
82
+
environment:
83
+
- PUID=1001
84
+
- PGID=1001
85
+
- MYSQL_ROOT_PASSWORD=<DATABASE PASSWORD>
86
+
- TZ=Europe/London
87
+
volumes:
88
+
- <path to data>:/config
89
+
ports:
90
+
- 3306:3306
91
+
mem_limit: 4096m
92
+
restart: unless-stopped
93
+
```
94
+
95
+
## Parameters
50
96
51
-
It is based on ubuntu xenial with s6 overlay, for shell access whilst the container is running do `docker exec -it mariadb /bin/bash`.
97
+
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
52
98
53
-
### User / Group Identifiers
99
+
| Parameter | Function |
100
+
| :----: | --- |
101
+
|`-p 3306`| Mariadb listens on this port. |
102
+
|`-e PUID=1001`| for UserID - see below for explanation |
103
+
|`-e PGID=1001`| for GroupID - see below for explanation |
104
+
|`-e MYSQL_ROOT_PASSWORD=<DATABASE PASSWORD>`| Set this to root password for installation (minimum 4 characters). |
105
+
|`-e TZ=Europe/London`| Specify a timezone to use EG Europe/London. |
106
+
|`-v /config`| Contains the db itself and all assorted settings. |
54
107
55
-
Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
108
+
## User / Group Identifiers
56
109
57
-
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
110
+
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
111
+
112
+
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
113
+
114
+
In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as below:
If you didn't set a password during installation, (see logs for warning) use
67
126
`mysqladmin -u root password <PASSWORD>`
@@ -74,28 +133,45 @@ Unraid users, it is advisable to edit the template/webui after setup and remove
74
133
Find custom.cnf in /config for config changes (restart container for them to take effect)
75
134
, the databases in /config/databases and the log in /config/log/myqsl
76
135
77
-
## Info
78
136
79
-
* Shell access whilst the container is running: `docker exec -it mariadb /bin/bash`
80
-
* To monitor the logs of the container in realtime: `docker logs -f mariadb`
81
-
82
-
* container version number
83
137
84
-
`docker inspect -f '{{ index .Config.Labels "build_version" }}' mariadb`
138
+
## Support Info
85
139
140
+
* Shell access whilst the container is running: `docker exec -it mariadb /bin/bash`
141
+
* To monitor the logs of the container in realtime: `docker logs -f mariadb`
142
+
* container version number
143
+
*`docker inspect -f '{{ index .Config.Labels "build_version" }}' mariadb`
86
144
* image version number
87
-
88
-
`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/mariadb`
145
+
*`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/mariadb`
146
+
147
+
## Updating Info
148
+
149
+
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
150
+
151
+
Below are the instructions for updating containers:
152
+
153
+
### Via Docker Run/Create
154
+
* Update the image: `docker pull linuxserver/mariadb`
155
+
* Stop the running container: `docker stop mariadb`
156
+
* Delete the container: `docker rm mariadb`
157
+
* Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
158
+
* Start the new container: `docker start mariadb`
159
+
* You can also remove the old dangling images: `docker image prune`
160
+
161
+
### Via Docker Compose
162
+
* Update the image: `docker-compose pull linuxserver/mariadb`
163
+
* Let compose update containers as necessary: `docker-compose up -d`
164
+
* You can also remove the old dangling images: `docker image prune`
89
165
90
166
## Versions
91
167
92
-
+**26.01.19:** Add pipeline logic and multi arch.
93
-
+**10.09.18:** Rebase to ubuntu bionic and use 10.3 mariadb repository.
94
-
+**09.12.17:** Fix continuation lines.
95
-
+**12.09.17:** Gracefully shut down mariadb
96
-
+**27.10.16:** Implement linting suggestions on database init script.
97
-
+**11.10.16:** Rebase to ubuntu xenial, add version labelling.
98
-
+**09.03.16:** Update to mariadb 10.1. Change to use custom.cnf over my.cnf in /config. Restructured init files to change config options on startup, rather than in the dockerfile.
99
-
+**26.01.16:** Change user of mysqld_safe script to abc, better unclean shutdown handling on restart.
100
-
+**23.12.15:** Remove autoupdating, between some version updates the container breaks
101
-
+**12.08.15:** Initial Release.
168
+
***26.01.19:** - Add pipeline logic and multi arch.
169
+
***10.09.18:** - Rebase to ubuntu bionic and use 10.3 mariadb repository.
170
+
***09.12.17:** - Fix continuation lines.
171
+
***12.09.17:**- Gracefully shut down mariadb.
172
+
***27.10.16:** - Implement linting suggestions on database init script.
173
+
***11.10.16:** - Rebase to ubuntu xenial, add version labelling.
174
+
***09.03.16:** - Update to mariadb 10.1. Change to use custom.cnf over my.cnf in /config. Restructured init files to change config options on startup, rather than in the dockerfile.
175
+
***26.01.16:** - Change user of mysqld_safe script to abc, better unclean shutdown handling on restart.
176
+
***23.12.15:**- Remove autoupdating, between some version updates the container breaks.
0 commit comments