Jump to content
linuxserver.io

[Support] Linuxserver.io - MariaDB

271 posts in this topic Last Reply

Recommended Posts

linuxserver_medium.png

 

Application Name: MariaDB

Application Site: https://mariadb.org/

Docker Hub: https://hub.docker.com/r/linuxserver/mariadb/

Github: https://github.com/linuxserver/docker-mariadb

 

If you're having issues with the container not starting take a look at this post.

 

Please post any questions/issues relating to this docker you have in this thread.

 

If you are not using Unraid (and you should be!) then please do not post here, instead head to linuxserver.io to see how to get support.

Edited by linuxserver.io
  • Upvote 1

Share this post


Link to post

I have tried getting this to run with no avail. My config folder in my appdata folder remains empty. No entries are made during the install except creating a  MariaDB folder.

Tried connecting to the database with mysql workbench, but this also  did workout for me.

Share this post


Link to post

That seems odd, do you mind pastebin the log file and a screenshot of your container config

Share this post


Link to post

Strange problem that only just started happening today. I start the container, it runs for a few seconds, then stops. The docker simply won't stay running. The log only shows this for each start:

-----------------------------------
GID/UID
-----------------------------------
User uid: 99
User gid: 100
-----------------------------------

Setting up mariadb-server-10.0 (10.0.22+maria-1~trusty) ...

 

I'm kinda relying on Mariadb as ownCloud is set up to work with it. No database, no ownCloud. Any suggestions? Further info?

 

Share this post


Link to post

Be pasient it may take some time depending on the speed of your local mirror

Share this post


Link to post

For what? I start the docker, it sits with the message above, and then stops itself after about 5 seconds. Leaving it alone does nothing.

Share this post


Link to post

Hey,

 

So what happens is you download the docker container, that starts up and pulls from Ubuntu's repository. 

 

Here's my log

 

-----------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \ 
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|

Brought to you by linuxserver.io
-----------------------------------
GID/UID
-----------------------------------
User uid: 99
User gid: 100
-----------------------------------

We are now refreshing packages from apt repositorys, this *may* take a while
Setting Up Initial Databases
Installing MariaDB/MySQL system tables in '/config/databases' ...

-----------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \ 
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|

Brought to you by linuxserver.io
-----------------------------------
GID/UID
-----------------------------------
User uid: 99
User gid: 100
-----------------------------------

We are now refreshing packages from apt repositorys, this *may* take a while
Setting Up Initial Databases
Installing MariaDB/MySQL system tables in '/config/databases' ...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h 6c7a126ae677 password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/config/databases'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from MariaDB
Corporation Ab. You can contact us about this at sales@mariadb.com.
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/

Database Setup Completed
#################################################################
# No root password or too short a password ,min of 4 characters #
# No root password will be set, this is not a good thing #
# You shoud set one after initialisation with the command #
# mysqladmin -u root password #
#################################################################
Nov 14 08:06:28 6c7a126ae677 syslog-ng[199]: syslog-ng starting up; version='3.5.3'
151114 08:06:28 mysqld_safe Logging to '/config/databases/6c7a126ae677.err'.
151114 08:06:28 mysqld_safe Starting mysqld daemon with databases from /config/databases

 

On the advanced tab is a parameter to set the root password.  I left mine at 0, as this is just for testing.

 

Is yours a new install or are you trying to replace an existing install?

 

What lonix was alluding to is that your container will perform an autoupdate from the Ubuntu repository each time it is started, occasionally there are problems with th Ubuntu mirrors, which can cause an issue, after any autoupdate occurs, then the container is restarted automatically. (Which is what my log shows above, this was my first install btw)

 

 

Share this post


Link to post

It's an existing installation, with one database (for ownCloud) in it.

Share this post


Link to post

It's an existing installation, with one database (for ownCloud) in it.

 

OK, and this is an existing install of the linuxserver container?  Not trying to migrate?

 

For testing, what I'd do is add a second instance of the MariaDB container to see if it installs properly,

 

Use the same root password

But use a different appdata folder (ie mariadb_test)

And a different name (ie mariadb_test)

 

Post the logs here and we'll take a look.

Share this post


Link to post

So I changed the name of my existing container in order to add a new one, and the update must have run successfully, because the container is now starting properly. However, my troubles aren't over. I'm now getting the following repeating in the log:

 

-----------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \ 
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|

Brought to you by linuxserver.io
-----------------------------------
GID/UID
-----------------------------------
User uid: 99
User gid: 100
-----------------------------------

We are now refreshing packages from apt repositorys, this *may* take a while
Nov 14 13:00:38 aab3299b69a3 syslog-ng[60]: syslog-ng starting up; version='3.5.3'
151114 13:00:38 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:38 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:39 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:39 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:39 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:40 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:40 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:40 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:42 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:42 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:42 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:43 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:43 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:43 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:44 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:44 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:44 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:45 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:45 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Share this post


Link to post

So I changed the name of my existing container in order to add a new one, and the update must have run successfully, because the container is now starting properly. However, my troubles aren't over. I'm now getting the following repeating in the log:

 

-----------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \ 
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|

Brought to you by linuxserver.io
-----------------------------------
GID/UID
-----------------------------------
User uid: 99
User gid: 100
-----------------------------------

We are now refreshing packages from apt repositorys, this *may* take a while
Nov 14 13:00:38 aab3299b69a3 syslog-ng[60]: syslog-ng starting up; version='3.5.3'
151114 13:00:38 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:38 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:39 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:39 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:39 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:40 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:40 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:40 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:42 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:42 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:42 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:43 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:43 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:43 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:44 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:44 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:44 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 13:00:45 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 13:00:45 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 13:00:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

 

 

is this a new container,  but existing data ?

Share this post


Link to post

Existing container, existing data.

 

can you paste the output from

 

docker exec -it <container-name> cat /config/databases/aab3299b69a3.err

Share this post


Link to post

root@Gallifrey:~# docker exec -it mariadb cat /config/databases/aab3299b69a3.err
cat: /config/databases/aab3299b69a3.err: No such file or directory

 

There is a .err file in there, but its date is Nov 12. Output at http://pastebin.com/CcTit5ta

Share this post


Link to post

root@Gallifrey:~# docker exec -it mariadb cat /config/databases/aab3299b69a3.err
cat: /config/databases/aab3299b69a3.err: No such file or directory

 

There is a .err file in there, but its date is Nov 12. Output at http://pastebin.com/CcTit5ta

 

your log is full of this message.

 

151029  6:25:04 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Share this post


Link to post

I have no idea what that debian-sys-maint@localhost user is. Certainly nothing I've created. I've only created a database for ownCloud, and that has its own user (named "owncloud") associated to it.

 

Also, the log on pastebin isn't reflecting what you asked. It's just the most recent log on there. I'm concerned that the docker says it's logging to a .err file that doesn't actually exist.

Share this post


Link to post

151115 01:34:29 mysqld_safe Logging to '/config/databases/Docker-Server.err'.

151115 01:34:29 mysqld_safe Starting mysqld daemon with databases from /config/databases

Nov 15 01:34:30 Docker-Server syslog-ng[70]: syslog-ng starting up; version='3.5.3'

sparklyballs@Docker-Server:~$ docker exec -it mariad cat /config/databases/Docker-Server.err

151114 20:16:18 mysqld_safe Starting mysqld daemon with databases from /config/databases

151114 20:16:18 [Note] /usr/sbin/mysqld (mysqld 10.0.22-MariaDB-1~trusty-log) starting as process 424 ...

151114 20:16:19 [Note] InnoDB: Using mutexes to ref count buffer pool pages

151114 20:16:19 [Note] InnoDB: The InnoDB memory heap is disabled

151114 20:16:19 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

151114 20:16:19 [Note] InnoDB: Memory barrier is not used

151114 20:16:19 [Note] InnoDB: Compressed tables use zlib 1.2.8

151114 20:16:19 [Note] InnoDB: Using Linux native AIO

151114 20:16:19 [Note] InnoDB: Using CPU crc32 instructions

151114 20:16:19 [Note] InnoDB: Initializing buffer pool, size = 256.0M

151114 20:16:19 [Note] InnoDB: Completed initialization of buffer pool

151114 20:16:19 [Note] InnoDB: Highest supported file format is Barracuda.

151114 20:16:19 [Note] InnoDB: 128 rollback segment(s) are active.

151114 20:16:19 [Note] InnoDB: Waiting for purge to start

151114 20:16:19 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1616717

151114 20:16:19 [Note] Plugin 'FEEDBACK' is disabled.

151114 20:16:19 [Note] Server socket created on IP: '::'.

151114 20:16:19 [Note] Reading of all Master_info entries succeded

151114 20:16:19 [Note] Added new Master_info '' to hash table

151114 20:16:19 [Note] /usr/sbin/mysqld: ready for connections.

Version: '10.0.22-MariaDB-1~trusty-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

151114 20:34:33 [Note] /usr/sbin/mysqld: Normal shutdown

 

151114 20:34:33 [Note] Event Scheduler: Purging the queue. 0 events

151114 20:34:33 [Note] InnoDB: FTS optimize thread exiting.

151114 20:34:33 [Note] InnoDB: Starting shutdown...

151114 20:34:35 [Note] InnoDB: Shutdown completed; log sequence number 1616727

151114 20:34:35 [Note] /usr/sbin/mysqld: Shutdown complete

 

151114 20:34:35 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

151115 01:34:29 mysqld_safe Starting mysqld daemon with databases from /config/databases

151115  1:34:29 [Note] /usr/sbin/mysqld (mysqld 10.0.22-MariaDB-1~trusty-log) starting as process 290 ...

151115  1:34:30 [Note] InnoDB: Using mutexes to ref count buffer pool pages

151115  1:34:30 [Note] InnoDB: The InnoDB memory heap is disabled

151115  1:34:30 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

151115  1:34:30 [Note] InnoDB: Memory barrier is not used

151115  1:34:30 [Note] InnoDB: Compressed tables use zlib 1.2.8

151115  1:34:30 [Note] InnoDB: Using Linux native AIO

151115  1:34:30 [Note] InnoDB: Using CPU crc32 instructions

151115  1:34:30 [Note] InnoDB: Initializing buffer pool, size = 256.0M

151115  1:34:30 [Note] InnoDB: Completed initialization of buffer pool

151115  1:34:30 [Note] InnoDB: Highest supported file format is Barracuda.

151115  1:34:30 [Note] InnoDB: 128 rollback segment(s) are active.

151115  1:34:30 [Note] InnoDB: Waiting for purge to start

151115  1:34:30 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1616727

151115  1:34:30 [Note] Plugin 'FEEDBACK' is disabled.

151115  1:34:30 [Note] Server socket created on IP: '::'.

151115  1:34:30 [Note] Reading of all Master_info entries succeded

151115  1:34:30 [Note] Added new Master_info '' to hash table

151115  1:34:30 [Note] /usr/sbin/mysqld: ready for connections.

Version: '10.0.22-MariaDB-1~trusty-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

Share this post


Link to post

part of the name of the log file is made up of the name of the system it's running on, in dockers not running as host, that will be an odd number like is being reported in unraid log.

 

 

Share this post


Link to post

Learned something new, thanks.

 

Unfortunately, I still have a non-functional MySQL installation. I've tried connecting from another computer with no luck. So I thought maybe the root password is wrong. Made sure the docker was running. Ran a docker exec -it mariadb /bin/bash. Tried to change the password. Got this:

 

root@aab3299b69a3:/# mysqladmin -u root password <password>
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

 

That's not right...

Share this post


Link to post

Learned something new, thanks.

 

Unfortunately, I still have a non-functional MySQL installation. I've tried connecting from another computer with no luck. So I thought maybe the root password is wrong. Made sure the docker was running. Ran a docker exec -it mariadb /bin/bash. Tried to change the password. Got this:

 

root@aab3299b69a3:/# mysqladmin -u root password <password>
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

 

That's not right...

 

it's just further indication that mysql/mariadb isn't running inside the container.

 

you can't change the password that way if the service isn't running.

 

you haven't been clear if the data was migrated from another installation somewhere.

Share this post


Link to post

Thought I had. Oh well.

 

I installed MariaDB originally a couple of months ago. Created my database there and then. Nothing was imported/migrated. Only one database running (for ownCloud). It's been running fine until this problem. Nothing has been migrated, no other MariaDB docker has been used. It's all been the Linuxserver docker right from the get-go.

Share this post


Link to post

Thought I had. Oh well.

 

I installed MariaDB originally a couple of months ago. Created my database there and then. Nothing was imported/migrated. Only one database running (for ownCloud). It's been running fine until this problem. Nothing has been migrated, no other MariaDB docker has been used. It's all been the Linuxserver docker right from the get-go.

 

 

one question that may seem odd, but might be relevant.

 

have you at any time recently deleted a docker, deleted the appdata folder and then readded the same docker with the same settings ?

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now