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.

[SOLVED] MariaDB share use Cache?

Featured Replies

Getting ready to setup MariaDB and wondering if there are any best practices regarding using the cache drive to improve performance (or if cache should be used at all!?).

 

Thanks in advance...

Getting ready to setup MariaDB and wondering if there are any best practices regarding using the cache drive to improve performance (or if cache should be used at all!?).

 

Thanks in advance...

All docker apps will slow down if their appdata is not set to the cache-only appdata share.
  • Author

Ah, so all dockers should reside on the cache...including the DB file itself?  So then the only protection for a db file then would be the CA Backups since parity is not involved?

 

Or...do we use volume mappings to point some db variable at a disk share somewhere?  Searching on MariaDB configuration unraid has not uncovered any documentation on Mariadb... (*sigh*), sorry to be so needy... ;)

Ah, so all dockers should reside on the cache...including the DB file itself?  So then the only protection for a db file then would be the CA Backups since parity is not involved?

 

Or...do we use volume mappings to point some db variable at a disk share somewhere?  Searching on MariaDB configuration unraid has not uncovered any documentation on Mariadb... (*sigh*), sorry to be so needy... ;)

Pretty much.  If you really want the db to be on the array, just set its /config to be a separate appdata (named differently) that resides on the array.

 

However, my opinion (yours and others may differ) is that its unnecessary.

 

#1 - CA backup will back up the db on the schedule you choose.

#2 - Presumably you're using MariaDB for Kodi.  Its nothing in the event of a cache failure (and subsequent restore of appdata) to tell kodi to rescan the library and add the new media that were inbetween backup sets.

#3 - Intermittently backup Kodi's database (to separate files, not a single file).  This has the result of tossing .nfo files into every folder for the media on the array, so that in a catastrophic failure and no backup available, you can still easily rescan the library and not have to adjust the scraping results (or the watched status)

 

Your other option would be to create a cache pool so that you have built-in redundancy of the cache drive and still utilize CA backup.

Jeffrey, I think you're over thinking it.  Stick it on the cache.  If needs be restore the database should you get cache drive failure.  You'll suffer in terms of performance if it's on the array and everytime you write to the database your array and parity will need to spin up.

  • Author

Got it.  Is there any other container volumes that need to be defined other than /config?  I assume there should be a database volume somewhere?

Got it.  Is there any other container volumes that need to be defined other than /config?  I assume there should be a database volume somewhere?

its in /config
  • Author

The MariaDB Docker installed without a hitch and its running.  However, when  I hit port :3306, nothing loads and there's no GUI in the MariaDB icon in the dashboard.  Took a look at the log file (see below) and no help there.

 

width=300http://my.jetscreenshot.com/12412/20160723-xhre-158kb.jpg[/img]

 

So tried the suggested script to run for secure installation, it was not found.

 

width=300http://my.jetscreenshot.com/12412/20160723-sar7-10kb.jpg[/img]

 

So tried to reset password, but mysqladmin isn't in usr/bin

 

width=300http://my.jetscreenshot.com/12412/20160723-x1jx-10kb.jpg[/img]

 

So tried to load up Workbench and access server:3306, no love there either.

 

width=300http://my.jetscreenshot.com/12412/20160723-zx3n-135kb.jpg[/img]

 

Ran out of options...what am I missing?

 

 

  • Author

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

 

You're trying to execute the commands in Unraid, you first need to open a shell inside the container.

 

There is no webui for MariaDB.  3306 is the port that the database connections take place over.

 

Duh!  That makes perfect sense.  Apologies in advance, but I'm an unRaid Noob when it comes to dockers.  How to I open a shell inside the container?  Tried to attach to the container - Docker attach 0a3f64f0a95b (container id pulled from container log...?), but just got a blank line...

 

width=300http://my.jetscreenshot.com/12412/20160723-eajg-8kb.jpg[/img]

 

 

And why couldn't I connect to MariaDB via port 3306 from SQL Workbench (see screenshots in previous post)?

 

Thanks in advance!

How to I open a shell inside the container? 

 

It's on the github page. https://github.com/linuxserver/docker-mariadb#logs-and-shell

 

docker exec -it mariadb /bin/bash

 

And why couldn't I connect to MariaDB via port 3306 from SQL Workbench (see screenshots above)?

 

No idea, don't use it.  Did you set a root password in the docker page setup?  No need to drop to command line to do that.

  • Author

Hmmm, did not see a password on the mariadb docker setup page.

 

Thanks for the link.  That helped me get into the docker and was able to execute the mysqladmin command to change the db root password.  But still can't connect from SQL Workbench.  I need to use workbench in order to do database work.  I want to use the system for app/db development, etc...more than just for other dockers...  Any thoughts on why I can't connect to the MariaDB on port 3306?

Hmmm, did not see a password on the mariadb docker setup page.

 

Thanks for the link.  That helped me get into the docker and was able to execute the mysqladmin command to change the db root password.  But still can't connect from SQL Workbench.  I need to use workbench in order to do database work.  I want to use the system for app/db development, etc...more than just for other dockers...  Any thoughts on why I can't connect to the MariaDB on port 3306?

 

Nope, I use the same docker and connect just fine using HeidiSQL.  Try deleting the container and the appdata and setting the password in the docker setup page. (If you're on V6.1.9 it may look a bit different, might need to switch to advanced)

 

z2gF0NE.png

  • Author

Yep, keep forgetting about the advanced button (grey on the far side where no one looks!).

 

Deleted everything and reinstalled.  Set password, ran mysql_secure_installation, completed fine.  Then ran mysql workbench.  still crashes.

 

Do I need to make any changes to /etc/mysql/my.cnf?

 

I tried to connect with my browser (just to see it it tries to connect) and it did.  I got the following, which seems a normal response.

 

width=300http://my.jetscreenshot.com/12412/20160724-yy3k-44kb.jpg[/img]

 

 

 

Archived

This topic is now archived and is closed to further replies.

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.