[Support] Linuxserver.io - MariaDB


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
Link to comment
  • 2 months later...

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?

 

Link to comment

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 [email protected].
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)

 

 

Link to comment

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.

Link to comment

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

Link to comment

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 ?

Link to comment

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)

Link to comment

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.

Link to comment

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

Link to comment

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...

Link to comment

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.

Link to comment

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.

Link to comment

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 ?

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.