Jump to content
linuxserver.io

[Support] Linuxserver.io - MariaDB

271 posts in this topic Last Reply

Recommended Posts

Definitely not.

 

kk..

 

restart the container if it is stopped...

 

docker exec into again , cd to /config/databases and mv any file ending with .err (be very careful and make sure what you're doing) to .old

 

exit out of the exec session, restart the docker

 

exec back and paste the content of any new .err file

Share this post


Link to post

meanwhile i'm trying to bust a test copy of mariadb to see if it logs the error....

Share this post


Link to post

Step 1: Move .err files...

 

root@Gallifrey:~#  docker exec -it mariadb /bin/bash
root@aab3299b69a3:/# cd /config/databases
root@aab3299b69a3:/config/databases# ls -l
total 176347
-rw-r----- 1 abc   users    20089 Nov 12 21:29 4325730b7f89.err
-rw-rw---- 1 abc   users    16384 Nov 14 03:23 aria_log.00000001
-rw-rw---- 1 abc   users       52 Nov 14 03:23 aria_log_control
-rw-rw---- 1 abc   users 50331648 Nov 14 03:23 ib_logfile0
-rw-rw---- 1 abc   users 50331648 Nov 14 03:23 ib_logfile1
-rw-rw---- 1 abc   users 79691776 Nov 14 03:23 ibdata1
-rw-rw---- 1 abc   users        0 Oct 12 20:50 multi-master.info
drwx------ 2 mysql users     2976 Oct 12 20:50 mysql
drwx------ 2 abc   users     1512 Nov  8 19:10 owncloud
drwx------ 2 abc   users     2744 Oct 12 20:50 performance_schema
root@aab3299b69a3:/config/databases# mv 4325730b7f89.err 4325730b7f89.old
root@aab3299b69a3:/config/databases# exit
exit

 

Step 2: Restart docker from unRAID admin

 

Step 3: No new .err file created.

Share this post


Link to post

i forcefully deleted all the files in the mysql folder and now docker log is full of this

 

151115 02:17:33 mysqld_safe Starting mysqld daemon with databases from /config/databases

151115 02:17:33 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

 

over and over.

 

but the .err file is written and tells me i don't have any tables in databases

Share this post


Link to post

My unRAID log is still saying this:

151114 21:21:36 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 21:21:36 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151114 21:21:37 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 21:21:37 mysqld_safe Starting mysqld daemon with databases from /config/databases
151114 21:21:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

 

etc

Share this post


Link to post

-rw-r----- 1 abc abc 998K Nov 15 02:24 Docker-Server.err

-rw-rw---- 1 abc abc  16K Nov 15 02:15 aria_log.00000001

-rw-rw---- 1 abc abc  52 Nov 15 02:15 aria_log_control

-rw-rw---- 1 abc abc  48M Nov 15 02:24 ib_logfile0

-rw-rw---- 1 abc abc  48M Nov 15 02:14 ib_logfile1

-rw-rw---- 1 abc abc  12M Nov 15 02:15 ibdata1

-rw-rw---- 1 abc abc    0 Nov 15 02:14 multi-master.info

drwx------ 2 abc abc 4.0K Nov 15 02:14 mysql

drwx------ 2 abc abc 4.0K Nov 14 20:16 performance_schema

 

 

your mysql folder has different ownership to mine.

Share this post


Link to post

I have no idea where that abc user came from. Nothing I've personally created, but I did notice reference in my.cnf to an abc user when I was trying to figure this out earlier. Didn't touch it, haven't changed anything.

Share this post


Link to post

I have no idea where that abc user came from. Nothing I've personally created, but I did notice reference in my.cnf to an abc user when I was trying to figure this out earlier. Didn't touch it, haven't changed anything.

 

abc is the user we (linuxserver) create to run services etc inside of the docker.

 

it's transparent to unraid users because it's preset in the template but for other systems it allows people to set uid and gid to match their host user.

 

 

anyways, long and short, for some reason that folder has changed ownership.

 

from the unraid terminal run this

 

docker exec -it mariadb find /config/databases  \! -user abc -print

 

there shouldn't be any output normally....

 

 

 

Share this post


Link to post

Well...

 

root@Gallifrey:~# docker exec -it mariadb find /config/databases  \! -user abc -print
/config/databases
/config/databases/mysql

Share this post


Link to post

dr who fan eh ?

 

anyways, i think we're closing in on what's going on.

 

docker exec back into the container and once inside the container run...

 

chown -R abc:abc /config

 

then exit out and restart the container.

 

 

i changed those two folders to be owned by mysql:users and my mariad instance didn't start.

 

the good news is the only things affected are two folders and none of the files within them.

 

the bad news is i don't why it would have happened, the only thing i can think of is running unraid newperms script.

Share this post


Link to post

A fan for 40 years and counting.

 

OK, commands have been run, and so far the log looks like this:

 


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

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 21:45:19 aab3299b69a3 syslog-ng[59]: syslog-ng starting up; version='3.5.3'
151114 21:45:19 mysqld_safe Logging to '/config/databases/aab3299b69a3.err'.
151114 21:45:19 mysqld_safe Starting mysqld daemon with databases from /config/databases

 

No repeating itself over and over.

 

And most importantly I can now connect to the MySQL server from another computer using the root account. I'll now enable the ownCloud docker and see if it connects ok. Will post back when I find out.

 

Thank you for your help! But FYI, I haven't run the newperms script at all since I originally installed MariaDB.

Share this post


Link to post

So ownCloud now works, therefore I'm at 100% working again. Thanks for your help!

Share this post


Link to post

I'm hoping you can help as I'm about through the laptop out of the window.

 

I've been trying for ages to set up the mariadb docker and eventually the kodi docker.

 

I've both up and running however I cant connect to the the database at all.  I've installed mysql workbench and tried connecting to the server but connection is always refused.

 

I've found this whole process exceptionally frustrating and am hoping you guys can help please.

 

Kind regards

 

 

Scott

Share this post


Link to post

I'm hoping you can help as I'm about through the laptop out of the window.

 

I've been trying for ages to set up the mariadb docker and eventually the kodi docker.

 

I've both up and running however I cant connect to the the database at all.  I've installed mysql workbench and tried connecting to the server but connection is always refused.

 

I've found this whole process exceptionally frustrating and am hoping you guys can help please.

 

Kind regards

 

 

Scott

 

Hi Scott, could you post some more information for us please? For example, what details are you putting into MySQL Workbench/system logs etc

 

Thanks

Share this post


Link to post

Hostname: 192.168.1.105 = Ip address of unraid server

port 3306

Username: root

Password: (i've specified a password and typed it in)

Connection method standard tcp/ip

 

When trying to connect, it appears as if it cant find the server.

 

In terms of system logs, where do I get them from?

 

Share this post


Link to post

I tried heidisql it has the same issue.  its as if the db server doesnt exist

 

Im stuck on what to do.

 

command line

 

docker exec -it mariadb bash

mysql -uroot -p 

CREATE USER 'kodi' IDENTIFIED BY 'kodi';
GRANT ALL ON *.* TO 'kodi';
flush privileges;
exit
exit

 

 

 

 

Share this post


Link to post

After I run the mysql -uroot -p command, I get this message

 

"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")"

 

 

Share this post


Link to post

After I run the mysql -uroot -p command, I get this message

 

"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")"

 

Can you post a screenshot or something of how you have your docker container setup...  (the bit where you fill in ports, folders etc)

Share this post


Link to post

Attached as requested, I've no Idea if I've done it correctly

 

is appData share set to cache only ?

 

Share this post


Link to post

Hi. This has happened twice now after the first time i scrapped my original setup and started again but this time i would like to try and find the problem.

 

I run mariadb for my kodi boxes. For some reason my unraid web page froze so i had to manually reboot the server, and when the server comes back mariadb doesnt seem to work anymore.

 

All my media is missing from kodi.

 

Heres a screen shot of the log

061b6eea60e5034e90edf7526c4aee28.jpg

 

There isn't a .err file in my config folder

 

42c66cd1920ca26157c2f446ea490a9c.jpg

Share this post


Link to post

Hi. This has happened twice now after the first time i scrapped my original setup and started again but this time i would like to try and find the problem.

 

I run mariadb for my kodi boxes. For some reason my unraid web page froze so i had to manually reboot the server, and when the server comes back mariadb doesnt seem to work anymore.

 

All my media is missing from kodi.

 

Heres a screen shot of the log

061b6eea60e5034e90edf7526c4aee28.jpg

 

There isn't a .err file in my config folder

 

42c66cd1920ca26157c2f446ea490a9c.jpg

 

i've just pushed a build to the dockerhub to mitigate this while we work on a permanent fix, i believe i the issue is related to not being able to answer a dialog when updating to a later version of mariadb.

 

hopefully pulling the newer build shouldn't affect your data.

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