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.

Comprehensive n00bs Guide on Installing MySQL (and unMENU) to an unRAID Server

Featured Replies

  • Author

FIgured out that I had to turn on MySQL from the unRAID menu under settings.

 

EDIT:  STill having same problem though.  Powered down the server and powered it back up to have no connection to the MySQL database.  I also no longer have the MySQL logo under settings.  I guess I have to enable reinstall on startup.  How do I manually do that?

  • Replies 80
  • Views 38.8k
  • Created
  • Last Reply

Did you put the plugin on the cache drive? From your first post it sounds like you did. If that is the case it is also the answer as to why it did not reinstall on startup. The plg should be in /boot/config/plugins do not put it in a subfolder of plugins either.

  • Author

So if you place the plugin inside the plugin folder on the flash drive and install it using the installplg command from the command prompt while in that folder how do you tell it to run the database off the cache drive?

 

Edit:  I guess I just run the command while in the cache drive?  Do I need to create a mysql folder in the cache drive to run the command from?

You are actually making this more complicated then it really is. Put the plugin in the plugins folder on the flash drive. In the webgui you can specify the database location. The plugin will reinstall every time you reboot and will reference the location specified in the config file which will be populated by the location you specified in the webgui. This is actually a really easy install.

  • Author

You are actually making this more complicated then it really is. Put the plugin in the plugins folder on the flash drive. In the webgui you can specify the database location. The plugin will reinstall every time you reboot and will reference the location specified in the config file which will be populated by the location you specified in the webgui. This is actually a really easy install.

 

I tend to make things more complicated....not on purpose though!

 

The MySQL online interface says /mnt/user/mysql is the data directory.  Do I need to change that to /mnt/cache/mysql?

 

Also, I did another reboot and it did not reconnect to the already populated database.  ARgh!  I checked the config file and it was exactly as you posted earlier.

You should be fine with the current location. I have mine set the same way. When you reboot is the plugin enabled by default now? Also do you have the user share set to use cache only?

  • Author

You should be fine with the current location. I have mine set the same way. When you reboot is the plugin enabled by default now? Also do you have the user share set to use cache only?

 

I  have no idea how to look this up.  When I did the original MySQL install I used unMENU so there was something on the unMENU web interface that enabled me to click on "reinstall on reboot".  Because I did this manual plugin install using a telnet session I have no idea where to view these options.  I also have no idea what you mean when you ask if the user share is set to use cache only.  I'm not even sure where the database is installed.

 

I just put the plugin in the folder I was told to.  I then opened up a telnet session.  I created a folder called mysql on the cache drive.  I navigated to the folder use the 'cd' command and then used the installplg command to install the plugin.

Under settings on the webgui should be a mysql section where you can enable and disable the service. This also will have the path where your database will exist. To check the user share goto the user shares section select the share and then under the share settings make sure it is set to only use the cache. You actually did not need to run the installplg. You could have just restarted the server and it would have installed. I have never had to do anything special to make mine reinstall on reboot. If its in the plugins directory it will reinstall on reboot. As long as you have the path configured correctly from the webgui then your database should be loaded without an issue.

  • Author
Ngo0SDh.jpg

Exactly. All of that is set how it should be. Now as long as you have a user share for mysql it should load correctly every time.

 

And make sure the user share is configured as cache only. That way mover does not try to move it and it doesn't try to expand off the cache drive.

  • Author

Exactly. All of that is set how it should be. Now as long as you have a user share for mysql it should load correctly every time.

 

And make sure the user share is configured as cache only. That way mover does not try to move it and it doesn't try to expand off the cache drive.

 

How do you configure the user shares?  Under settings and share settings,  enable user shares is selected to no.  Should I enable it and then under Included disks type in "cache" ?

If you do not have user shares enabled then that is your problem right there. So your options are to enable user shares which many people will tell you are great. Or you can change the path configured for mysql to cache instead of user and you should be good.

  • Author

If I enable user shares do I need to type "cache" in the included drive line?

 

Also, if I don't enable user shares, do I just go to the mysql.cfg file in the plugin folder on the cache drive and change it to:

 

#mysql configuration

SERVICE="enable"

DATADIR="/mnt/cache/mysql"

 

If you enable user shares you can just leave it set to all and in the drop down for use cache disk change that to only. As for the config file you shouldn't have a config file on the cache drive. The config file should be on your flash drive under /boot/config/plugins/mysql. You can just stop the service in the webgui. Then change the value in the webgui to /mnt/cache/mysql, then enable the service again. It is really quick either way. You should consider looking into configuring user shares though. It is one of the easiest ways to work with your data. Especially since you are using XBMC. Then you don't need to add individual disks as the source you can just add the user share. Example: smb://192.168.1.2/Movies, instead of smb://192.168.1.2/disk1/movies and smb://192.168.1.2/disk2/movies, etc.

  • Author

If you enable user shares you can just leave it set to all and in the drop down for use cache disk change that to only. As for the config file you shouldn't have a config file on the cache drive. The config file should be on your flash drive under /boot/config/plugins/mysql. You can just stop the service in the webgui. Then change the value in the webgui to /mnt/cache/mysql, then enable the service again. It is really quick either way. You should consider looking into configuring user shares though. It is one of the easiest ways to work with your data. Especially since you are using XBMC. Then you don't need to add individual disks as the source you can just add the user share. Example: smb://192.168.1.2/Movies, instead of smb://192.168.1.2/disk1/movies and smb://192.168.1.2/disk2/movies, etc.

 

The drop down options for my Cache Settings for "use cache disk" are just yes and no, not "only".

 

Which should I choose?

 

Edit: Just sent you a PM Mobias

I would choose yes in that case. If you are using the cache drive solely as an app drive you may want to consider disabling the mover script if it is installed. You don't want the MySQL folder to end up on an array drive. I find it interesting that you cannot choose only as an option though.

  • 2 months later...

Hello forum..

 

I was able to get MySQL database up and running using this post and I am happy to report that all 3 of my HTPC's are sharing the same XBMC library.  However, I cannot access the MySQL folder that was created on my SSD share through SMB, I get a permissions error when i click on the folder in Windows explorer.  Is this normal??  What could I or should I do to correct this? 

 

Thanks in advance!

  • 3 weeks later...

How do I copy the advancedsettings xml file to my OpenElec box?

 

I know the path is /storage/.xbmc/userdata/ but I don't know how to copy a file to it?

 

<EDIT> 

 

Never mind, was able to to use a windows box, and go start, run, //ip address of OpenElec box and then copy-paste

I have setup MySQL, and put the advancedsettings.xml file onto my OpenElec box.

 

When I go to add my video source, the source appears to add, but it doesn't scrape anything.  I can go to the files and see the contents of my data source, but nothing gets scraped.

 

What could the issue be?

Did you forget to set the source as movies, tv show, music, whatever? If you didn't specify what the source was then it's not going to scrape.

  • 2 weeks later...

Unfortunately that is not the issue, I set the source, but because it doesn't scan anything, the source does get blanked, but then I set it again, and the cycle repeats.

  • 6 months later...
  • Author

Hope this thread has helped people in installing a MySQL database on their unRAID server.  If there are any questions, feel free to continue to post.

  • 5 months later...

Though I might post here before starting my own topic. The putty commands do not appear to be doing anything at all.

 

What am I doing wrong

putty.JPG.1dfe84255343d9cde6bad321c1f4468d.JPG

Though I might post here before starting my own topic. The putty commands do not appear to be doing anything at all.

 

What am I doing wrong

You're missing the semicolon  at the end of the sql commands

Though I might post here before starting my own topic. The putty commands do not appear to be doing anything at all.

 

What am I doing wrong

You're missing the semicolon  at the end of the sql commands

 

Thank you so much

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.