Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Linuxserver.io - MariaDB

Featured Replies

I'm no expert on mysql so I won't comment on that bit, but to get into a container

 

docker exec -it $CONTAINER-NAME bash

 

  • Replies 623
  • Views 233k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • goosetrousers
    goosetrousers

    I did this, everything worked again. Then I updated to  linuxserver/mariadb:latest and everything continued to work, but with an Alpine base. Saved me from migrating, I guess I'll sit on my back

  • @exico here is my workaround,   try using this Repository: linuxserver/mariadb:110.4.21mariabionic-ls31

  • Update:   I re-installed the mariadb docker without password and then I managed to login with root account (no password) - then manually changed the password  mysql -u root -p mysql>

Posted Images

Thanks, just found that info also :)

 

So this is what I have done so far;

 

Copied over the two most recent xbmc DB's using MC to appdata\mariadb

 

docker exec -it mariadb /bin/bash

mysql -u root –p

Enter password

CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';  and press return

GRANT ALL ON *.* TO 'xbmc';  and press return

Close out the command line tool with \q

Close out the docker with \q

 

I can now connect via my MySQL app on my mac using the xbmc user and see the two xbmc DB's I copied over.

 

Just started my Kodi on AppleTV but it's not seeing the DB so I have some more work to do to find out why.

 

I think I'm on the right path....

 

  • 1 month later...

Do I need to install PDO to be able to connect using PHP?

I just ran the updater the other day to the latest version and now NextCloud fails saying the MySQL server has gone away. When I check the MariaDB logs it is filled and continuing to scroll this:

 

180318 16:49:32 mysqld_safe Logging to syslog.
180318 16:49:32 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:36 mysqld_safe Logging to syslog.
180318 16:49:36 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:36 mysqld_safe Logging to syslog.
180318 16:49:36 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:39 mysqld_safe Logging to syslog.
180318 16:49:39 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:42 mysqld_safe Logging to syslog.
180318 16:49:42 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:42 mysqld_safe Logging to syslog.
180318 16:49:42 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:45 mysqld_safe Logging to syslog.
180318 16:49:45 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:48 mysqld_safe Logging to syslog.
180318 16:49:48 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:51 mysqld_safe Logging to syslog.
180318 16:49:51 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:55 mysqld_safe Logging to syslog.
180318 16:49:55 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:55 mysqld_safe Logging to syslog.
180318 16:49:55 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:58 mysqld_safe Logging to syslog.
180318 16:49:58 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:50:01 mysqld_safe Logging to syslog.
180318 16:50:01 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:50:01 mysqld_safe Logging to syslog.
180318 16:50:01 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:50:04 mysqld_safe Logging to syslog.
180318 16:50:04 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:50:07 mysqld_safe Logging to syslog.
180318 16:50:07 mysqld_safe Starting mysqld daemon with databases from /config/databases

Any ideas on what may have gone wrong and how to fix?

 

Thanks for the tip.

 

Hmm, somehow MariaDB was missed in my backups. I tried option 2 but there was no change.

 

Can I just re-install the docker or will I need to do Nextcloud as well? If I leave my NextCloud data in place, will I lose information doing this or will I need to re-import my files once I get NextCloud working again?

7 hours ago, klingon00 said:

Thanks for the tip.

 

Hmm, somehow MariaDB was missed in my backups. I tried option 2 but there was no change.

 

Can I just re-install the docker or will I need to do Nextcloud as well? If I leave my NextCloud data in place, will I lose information doing this or will I need to re-import my files once I get NextCloud working again?

When I had all these problems with the MariaDB I've discovered it was a faulty SSD cache, that was corrupting the databases

 

17 hours ago, byographic said:

When I had all these problems with the MariaDB I've discovered it was a faulty SSD cache, that was corrupting the databases

 

That may be my problem. My appdata share is residing on the SSD cache. What was faulty about it and what did you do to resolve the issue?

7 hours ago, klingon00 said:

That may be my problem. My appdata share is residing on the SSD cache. What was faulty about it and what did you do to resolve the issue?

if I remember it correctly I've:

- run the mover

- stop the array

- selected "none" instead of the cache drive in the cache section

- restart the array

 

however, on this topic, there is an official explanation: https://lime-technology.com/forums/topic/46802-faq-for-unraid-v6/?tab=comments#comment-480418

  • 3 weeks later...

Hey, 

 

just doing some springcleaning of my box and I see it is recommended to use MariaDB from either linuxserver's or binhex's repo (according to the 'Fix common problems' plugin)

I'm currently running my kodi and owncloud database on this docker (from needo's repo), are there any procedure to safely migrate my databases over to a new docker ? 

Beeing used to some light MSSQL management from work but mySQL is the much of the same but quite different :) 

MariaDB docker says there is an update. I have updated, but it still shows update available. 

 

Pulling image: linuxserver/mariadb:latest
IMAGE ID [latest]: Pulling from linuxserver/mariadb. 
IMAGE ID [9be5c6869873]: Pulling fs layer. Downloading 100% of 41 MB. Download complete. Extracting. 
IMAGE ID [b954adc8b2ea]: Pulling fs layer. Downloading 100% of 817 B. Download complete. 
IMAGE ID [7417f525481d]: Pulling fs layer. Download complete. 
IMAGE ID [4e3280041f03]: Pulling fs layer. Download complete. 
IMAGE ID [e26640012edf]: Pulling fs layer. Downloading 100% of 163 B. Verifying Checksum. Download complete. 
IMAGE ID [43e4d6ff98e1]: Pulling fs layer. Download complete. 
IMAGE ID [3dd04afd22dd]: Pulling fs layer. Downloading 100% of 14 MB. Verifying Checksum. Download complete. 
IMAGE ID [1ed2672d3116]: Pulling fs layer. Downloading 100% of 450 B. Download complete. 
IMAGE ID [a1d0ddccc53e]: Pulling fs layer. Downloading 100% of 68 MB. Verifying Checksum. Download complete. 
IMAGE ID [242f2575c5e6]: Pulling fs layer. Downloading 100% of 4 KB. Verifying Checksum. Download complete. 
TOTAL DATA PULLED: 123 MB

Stopping container: mariadb
Successfully stopped container 'mariadb'

Removing container: mariadb
Successfully removed container 'mariadb'

Command:
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='mariadb' --net='bridge' -e TZ="America/Chicago" -e HOST_OS="unRAID" -e 'PUID'='99' -e 'PGID'='100' -e 'MYSQL_ROOT_PASSWORD'='x' -p '3306:3306/tcp' -v '/mnt/cache/appdata/mariadb':'/config':'rw' 'linuxserver/mariadb'
9cde2120a29827974f3a064185370dc9954d1e779306c3b3d759a9372e55da75

The command finished successfully!

 

2 hours ago, Encino Stan said:

MariaDB docker says there is an update. I have updated, but it still shows update available. 

 


Pulling image: linuxserver/mariadb:latest
IMAGE ID [latest]: Pulling from linuxserver/mariadb. 
IMAGE ID [9be5c6869873]: Pulling fs layer. Downloading 100% of 41 MB. Download complete. Extracting. 
IMAGE ID [b954adc8b2ea]: Pulling fs layer. Downloading 100% of 817 B. Download complete. 
IMAGE ID [7417f525481d]: Pulling fs layer. Download complete. 
IMAGE ID [4e3280041f03]: Pulling fs layer. Download complete. 
IMAGE ID [e26640012edf]: Pulling fs layer. Downloading 100% of 163 B. Verifying Checksum. Download complete. 
IMAGE ID [43e4d6ff98e1]: Pulling fs layer. Download complete. 
IMAGE ID [3dd04afd22dd]: Pulling fs layer. Downloading 100% of 14 MB. Verifying Checksum. Download complete. 
IMAGE ID [1ed2672d3116]: Pulling fs layer. Downloading 100% of 450 B. Download complete. 
IMAGE ID [a1d0ddccc53e]: Pulling fs layer. Downloading 100% of 68 MB. Verifying Checksum. Download complete. 
IMAGE ID [242f2575c5e6]: Pulling fs layer. Downloading 100% of 4 KB. Verifying Checksum. Download complete. 
TOTAL DATA PULLED: 123 MB

Stopping container: mariadb
Successfully stopped container 'mariadb'

Removing container: mariadb
Successfully removed container 'mariadb'

Command:
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='mariadb' --net='bridge' -e TZ="America/Chicago" -e HOST_OS="unRAID" -e 'PUID'='99' -e 'PGID'='100' -e 'MYSQL_ROOT_PASSWORD'='x' -p '3306:3306/tcp' -v '/mnt/cache/appdata/mariadb':'/config':'rw' 'linuxserver/mariadb'
9cde2120a29827974f3a064185370dc9954d1e779306c3b3d759a9372e55da75

The command finished successfully!

 

 

 

that sounds like an unraid problem to me 

On 19.03.2018 at 12:35 PM, byographic said:

When I had all these problems with the MariaDB I've discovered it was a faulty SSD cache, that was corrupting the databases

On 20.03.2018 at 5:59 AM, klingon00 said:

That may be my problem. My appdata share is residing on the SSD cache. What was faulty about it and what did you do to resolve the issue?

I have the same problem. How can I understand that my cache SSDs are faulty?

 

And what should I do considering I don't backup. It seems, if this problem is associated with the db files, there is no point in deleting the mariadb docker and install again. 

I have seen some other posts in this thread with the below problem:

180318 16:49:39 mysqld_safe Starting mysqld daemon with databases from /config/databases
180318 16:49:42 mysqld_safe Logging to syslog.

It is said that this problem is related to an unclean shutdown from which I normally avoid. May I ask how often do users of this container face with this problem? If an "unclean" shutdown corrupts the mariadb so easily, perhaps it is better to use mariadb in a VM at a production setting.

 

Opinions please. Thank you.

Edited by sse450

Hi All, I want to make sure I'm doing this correctly.

 

New MariaDB install that i want to use for Nextcloud for now, and possibly more in the future.

 

I have HeidiSQL on my Windows box that I can manage the DBs with. 

I was going to create a separate user that is NOT root as I understand this is the right way to do things?

e.g. create a "nextcloud" user and a "nextcloud" database.

 

My question is what privileges does that user need and how do I grant them just to that one database?

 

Thanks.

Hi,

 

What is the best way to maintain/upgrade the database? My most recent pull is on 10.1.32. Is there a reason why it is on 10.1 and e.g. not on 10.2?

 

Many thanks

Sebastian

  • 3 weeks later...

Everytime CA Backup stopping and starting dockers affects nextcloud I google "unraid hulk smash" to get back here to fix it.

 

I may never remember how to get a shell prompt in my docker and then do # mysqld --tc-heuristic-recover commit

I may never forget:  "hulk smash"   

 

Thanks chaosratt.

 

On 12/1/2017 at 9:45 PM, chaosratt said:

I just wanted to chime in here on a fix for the the container seeming to not start properly.

 

There's no need to do a full appdata rollback usually.

 

Log into the container: docker exec -ti mariadb /bin/bash

 

run mysqld from the commandline and you'll get a full dump of what's wrong. It's likely *not* a corrupt database, but rather a transaction stuck in a partially completed state

Your choice is to "hulk smash" the partial transaction through, or revert it like it never happened. Both have potential consequences.

 

mysqld --tc-heuristic-recover commit

or

mysqld --tc-heuristic-recover rollback

 

Also, you have backups, right?

 

What's the best IDE to use to connect to a mariadb?  

Looks like the last time my Mysql docker got updated it's been upgraded to version 8. Is there a simple way I can migrate my DBs over to this container instead?

On 4/27/2018 at 12:45 PM, dimes007 said:

Everytime CA Backup stopping and starting dockers affects nextcloud

You can set CA Backup to not stop certain applications (Advanced Settings) before backing them up.  Whether or not this affects the app in question depends.  In my case, since there's no access to my db when the backup runs, I don't have any problems with leaving it running.

  • 2 weeks later...

***WARNING*** NEWBIE asking a question

 

I want to install the CONNECT engine.  First, is it included in the current build?  Second, do I run the sudo command right after getting into the docker?

 

If I'm totally off base please provide assistances

 

Thanks

Hi,

 

Will lsio be upgrading this container to 10.2 or maybe adding a new one for 10.2? There are some window functions I'm using in a project that I'd like to run on my unRAID server and would rather use an lsio docker but could roll my own if needed

 

https://mariadb.com/kb/en/library/window-functions/

I get odd files in my database folder. DLL files and ~ files. I can remove them, but they always come back. MariaDB doesn't need these files to work, so I am not sure what they are or where they come from. I am only using Kodi with MariaDB. Does anyone else get these files?

files.JPG

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.