[Support] Linuxserver.io - MariaDB


Recommended Posts

2 hours ago, stormense said:

In Unraid no problem with no password but if I put in one in key 3 I got this:


# mysql -u root -p
Enter password: mypassword
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
#

 

646UUNh.png

 

And when try to create a database with root user with no password I get this error:


MariaDB [(none)]> CREATE USER 'kodi' IDENTIFIED BY 'kodi';
ERROR 1396 (HY000): Operation CREATE USER failed for 'kodi'@'%'

 

Setting the password only works the first time when you create the container. Look at the Readme on github for instructions. Link in first post. 

Link to comment
  • 3 weeks later...

I don’t have any experience really with mariadb and I’m a little confused by the instructions in dockerhub-

Quote

NOTE changing the MYSQL_ROOT_PASSWORD variable after the container has set up the initial databases has no effect, use the mysqladmin tool to change your mariadb password. 

Unraid users, it is advisable to edit the template/webui after setup and remove reference to this variable.

 

Is this the correct process-

1. Install the docker with a MySQL root password variable defined in the template.

2. Run 

Quote

docker exec -it mariadb bash

mysqladmin -u root password <PASSWORD>

to change that password after the docker is running.

3. Delete the MySQL root password variable in the template and restart the docker.

4. Run the Kodi dB setup-

Quote

docker exec -it mariadb bash

mysql -uroot -p

CREATE USER ‘mrmc’ IDENTIFIED BY ‘mrmc’;

GRANT ALL ON *.* TO ‘mrmc’;

flush privileges;

exit

exit

 

Or have I totally misunderstood the instructions?😁

Edited by wgstarks
Link to comment
1 hour ago, wgstarks said:

I don’t have any experience really with mariadb and I’m a little confused by the instructions in dockerhub-

 

Is this the correct process-

1. Install the docker with a MySQL root password variable defined in the template.

2. Run 

to change that password after the docker is running.

3. Delete the MySQL root password variable in the template and restart the docker.

4. Run the Kodi dB setup-

 

Or have I totally misunderstood the instructions?😁

 

You don't have to change the password after you set it in the template before installing. 

The password is only set at first start, so if you want to change the password at a later time, you need to execute into the container to change it. 

The reason we ask unraid users to remove the password from the template is that it's easy for some to get hold of it in the template. 

Link to comment
30 minutes ago, saarg said:

 

You don't have to change the password after you set it in the template before installing. 

The password is only set at first start, so if you want to change the password at a later time, you need to execute into the container to change it. 

The reason we ask unraid users to remove the password from the template is that it's easy for some to get hold of it in the template. 

Thanks. Was wondering why I would set a password just to turn around and change it immediately afterwords. I’m guessing everything else is correct?

Link to comment

I cannot get a password to work with this container no matter what I try.  I have tried leaving it at the default password and tried setting one.  I tried deleting the logs, and tried using the console to set it.

 

# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
# mysqladmin -u root -p password password
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

 

 

Link to comment

From the instructions linked in the first post-

Quote

-e MYSQL_ROOT_PASSWORD - set this to root password for installation (minimum 4 characters)

Your password must be at least 4 letters.

 

Edit: You can run mysqladmin -u root password <PASSWORD> to set a new password.

Edited by wgstarks
Link to comment

I tried that, in that same example, right after I tried just logging in.  Also, the first password I set was over 4 characters.

 

I did notice though that when I try and log in I get access denied, but when I use mysqladmin it says connection failed

Edited by Crilith
Link to comment

Is there a chance that the password may have had special characters that might not be supported?

At this point it might be easier just to nuke the docker and start over (if you haven’t already). Delete the docker and image. Delete the docker’s appdata folder. Re-install and configure from scratch. Just an idea. Someone else may have better advice.

Edited by wgstarks
Link to comment
20 hours ago, wgstarks said:

At this point it might be easier just to nuke the docker and start over (if you haven’t already). Delete the docker and image. Delete the docker’s appdata folder. Re-install

2

I tried this many times but never deleted the appdata.  That fixed it.  Thank you.

Link to comment

To create a user you'll need to open a terminal window and enter

docker exec -it mariadb bash
mysql -uroot -p
CREATE USER ‘<username>’ IDENTIFIED BY ‘<password>’;

You should avoid special characters.

 

Once you have created the user and password you should be able to connect. Is this what you did?

Link to comment
  • 2 weeks later...

Does any1 know if there's a way to access the Mariadb from the web.... I mean I kind of need a user to access the database from the outside of my network..... I've look on the internet and at the moment people don't seem to try to so I'm kind of lost....

If any1 could have any idea it would be awesome...

Thanks

Link to comment
6 hours ago, LifeBasher said:

Does any1 know if there's a way to access the Mariadb from the web.... I mean I kind of need a user to access the database from the outside of my network..... I've look on the internet and at the moment people don't seem to try to so I'm kind of lost....

If any1 could have any idea it would be awesome...

Thanks

I would recommend OpenVPN server. It can be installed in a VM on your unRAID server or on many routers. There is also the OpenVPN-AS docker from LSIO (just search on CA). Fairly easy to setup if you watch @SpaceInvaderOne‘s video.

Link to comment
  • 2 weeks later...

So I am trying to create a database for my Home-Assistant.  I think I have everything setup but I am trying to figure out where my database file is getting saved.  Is there a way to determine this and also change it.  I want to save it to a specific disk/folder but not sure how to do this.

Link to comment
1 hour ago, mgranger said:

  I want to save it to a specific disk/folder but not sure how to do this

It's saved in your /config folder (ie: your appdata share).  It you want it to be on a different disk than say your sql database for kodi, then you've got to install a second instance of the app and set it's /config accordingly

Link to comment
  • 1 month later...

Need some help with troubleshooting a problem I am having with mariadb locking up.  I just upgraded an Intel NUC to LibreELEC 9.0.1.  I have been using mariadb to hold my Kodi database for quite a while, and everything has been working great.  Now a week after the upgrade my machine is not being able to access the databases stored in mariadb.  I have looked at the Kodi log files and see where Kodi is trying to access the database, but is unable to.

 

ERROR: Unable to open database: MyVideos116 [2002](Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (115)) (Address replaced with x)

 

I have verified that the IP address, user, and password is correct.  Nothing there has changed since it has been working for quite a while.

When I attempt to connect to maraiadb with HeidiSQL from another machine I am unable to, it just hangs.  I then have to restart the docker to be able to connect.  I have looked in the syslog on my unRAID server, but the only thing I see that has any connection with mariadb is:

 

kernel: traps: mysqld[10787] general protection ip:55fabff0322f sp:14757c0ab7f8 error:0 in mysqld[55fabf96a000+122a000]

 

I have checked the database for corruption but did not find any.

Are there any other log files I can investigate?  I am running unRAID 6.5.3 with what I believe is the latest version of this docker.

Any help is appreciated.

Link to comment
2 hours ago, gmythx said:

Need some help with troubleshooting a problem I am having with mariadb locking up.  I just upgraded an Intel NUC to LibreELEC 9.0.1.  I have been using mariadb to hold my Kodi database for quite a while, and everything has been working great.  Now a week after the upgrade my machine is not being able to access the databases stored in mariadb.  I have looked at the Kodi log files and see where Kodi is trying to access the database, but is unable to.

 

ERROR: Unable to open database: MyVideos116 [2002](Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (115)) (Address replaced with x)

 

I have verified that the IP address, user, and password is correct.  Nothing there has changed since it has been working for quite a while.

When I attempt to connect to maraiadb with HeidiSQL from another machine I am unable to, it just hangs.  I then have to restart the docker to be able to connect.  I have looked in the syslog on my unRAID server, but the only thing I see that has any connection with mariadb is:

 

kernel: traps: mysqld[10787] general protection ip:55fabff0322f sp:14757c0ab7f8 error:0 in mysqld[55fabf96a000+122a000]

 

I have checked the database for corruption but did not find any.

Are there any other log files I can investigate?  I am running unRAID 6.5.3 with what I believe is the latest version of this docker.

Any help is appreciated.

Docker logs for the MariaDB container would be useful. 

Link to comment
6 minutes ago, CHBMB said:

Docker logs for the MariaDB container would be useful. 

 

Sorry about that...  I did forget to mention these, but that may be because I did not see anything out of the ordinary.  But here they are.  When I could not gain access through HeidiSQL I would restart the docker.

 

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


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 40-initialise-db: executing...
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
190326 01:17:08 mysqld_safe Logging to syslog.
190326 01:17:08 mysqld_safe Starting mysqld daemon with databases from /config/databases
Caught SIGTERM signal!
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes

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


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 40-initialise-db: executing...
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
190326 01:39:10 mysqld_safe Logging to syslog.
190326 01:39:10 mysqld_safe Starting mysqld daemon with databases from /config/databases
Caught SIGTERM signal!
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes

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


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 40-initialise-db: executing...
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
190326 01:55:25 mysqld_safe Logging to syslog.
190326 01:55:25 mysqld_safe Starting mysqld daemon with databases from /config/databases

 

 

 

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.