Author Topic: How to change location of MySQL database to NAS-drive?  (Read 4271 times)

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
How to change location of MySQL database to NAS-drive?
« on: June 20, 2016, 10:29:55 AM »
Working with RadioDJ for many years now. There is no better way to make radio!

Now we are in the process of moving all important files to a network NAS-drive. Better with raid and backup.
All music files are on the drive already and working fine with RadioDJ.

Now we want to change the location of the MySql database to the drive. It looks like we can do that with MySql workbench.
Or are we forgetting someting? Is it just the database files, or do we have to do more than that

Can anyone advise us what to do and what's best?

Thanks for your advice.

Yvette
Streaming Hit Music

Marius

  • Administrator
  • Hero Member

  • Offline
  • *****
  • 5718
    • Radio DJ
Re: How to change location of MySQL database to NAS-drive?
« Reply #1 on: June 20, 2016, 10:57:44 AM »
Do a backup of your database and import it to the NAS.
One note, on the NAS MySQL instance you will need to allow connections from other ip's.
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
Re: How to change location of MySQL database to NAS-drive?
« Reply #2 on: June 20, 2016, 03:01:33 PM »
I'm not sure I understand what you mean.
I thought that the MySQL service remains on the PC, while the database file (the file where all information is stored) can be moved to the NAS.
And through Workbench we tell the service to store all future info in the file on the NAS.
Is this wrong thinking?

Yvette
Streaming Hit Music

Filip83

  • Sr. Member

  • Offline
  • ****
  • 351
    • www.diskonektedmusic.com
Re: How to change location of MySQL database to NAS-drive?
« Reply #3 on: June 20, 2016, 10:04:45 PM »
The SQL database can stay on the pc or it can be moved to a network hdd the way Marius described.
www.diskonektedmusic.com
www.soundcloud.com/diskonekted

Marius

  • Administrator
  • Hero Member

  • Offline
  • *****
  • 5718
    • Radio DJ
Re: How to change location of MySQL database to NAS-drive?
« Reply #4 on: June 21, 2016, 08:30:35 AM »
@Yvette - Hitz24, the service you mention, it's the MySQL server and the databases are located in "data" folder of the server. You cannot split them across network. Even if you would be able to do that, you wouldn't gain any notable space, because the databases are not that large. They only keep information about track files.
Or are you referring as database to audio files?
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
Re: How to change location of MySQL database to NAS-drive?
« Reply #5 on: June 21, 2016, 09:54:00 AM »
No,

I just wanted to move the database info file to the NAS. Just because this NAS is in raid and will be backupped.
But you say that it's not possible to move only the database file to the NAS?
If this is really the case, I have to install MariaDB on the NAS and import the database file there.

But I ran into another problem: I have to use phpMyAdmin to manage MariaDB on the NAS. After installing both, I cannot open phpMyAdmin. The setup page will not open. When clicking on phpMyAdmin, the link goes to http://ip-adres/phpMyAdmin . Unfortunately there is no such a page.

Do you have any idea how to get it rolling? Because now I have a NAS with MariaDB and phpMyAdmin on it, but I cannot manage them.

Yvette



Streaming Hit Music

Valdis

  • Hero Member

  • Offline
  • *****
  • 562
  • Personal Text
    Radio is a mental condition
    • home
Re: How to change location of MySQL database to NAS-drive?
« Reply #6 on: June 24, 2016, 02:54:49 AM »
But I ran into another problem: I have to use phpMyAdmin to manage MariaDB on the NAS. After installing both, I cannot open phpMyAdmin. The setup page will not open. When clicking on phpMyAdmin, the link goes to http://ip-adres/phpMyAdmin . Unfortunately there is no such a page.

Do you have any idea how to get it rolling? Because now I have a NAS with MariaDB and phpMyAdmin on it, but I cannot manage them.

phpMyAdmin will not allow to access setup if it has already been set up once. If you want to change phpMyAdmin connection settings, you can do so by editing config.inc.php file in phpMyAdmin root directory.

After you've got phpMyAdmin running again you should edit user permissions to allow connections from other hosts so you can manage the MariaDB instance on NAS from another PC using HeidiSQL.
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
Re: How to change location of MySQL database to NAS-drive?
« Reply #7 on: July 06, 2016, 10:40:19 AM »
OK,

Thank you all for your help and suggestions. We followed some of them, and all is working now.

First we put all content on the NAS. Then we told the Database function in RadioDJ to get the content from the NAS. This was easy.

Second we installed MariaDB and phpMyAdmin on the NAS. It was not posssible to remotely access phpMyAdmin. So through local access to phpMyAdmin we imported the MySQL database dump. This was also easy.

Third we had to tell the Database function in RadioDJ that the database was moved to MariaDB on the NAS. Making connection was easy, but then we had to stop and restart the MariaDB and phpMyAdmin services on the NAS to let it work. And we had to restart the computers from where RadioDJ was playing. After all reboots, all was working.

For people who have zero experience and knowledge of servers, networks and databases, like me, it was tricky business. So thanks for all the help!

Yvette




Streaming Hit Music