Setting up MySQL on a Drobo 5N

Credit: Scott Beale / Laughing Squid
I recently bought a new NAS storage device: the Drobo 5N.

After the basic setup, and file migration I decided to look into enabling the MySQL Server to store the metadata for my XBMC library.

As always, there are unexpected hurdles to leap over and hoops to jump through.

I've already forgotten the process once, so here's how to get MySQL working with remote access.

MySQL is one of Drobo's 'supported apps'. This means that you'll see it listed under Drobo Apps in the Drobo Dashboard for your device.


It's pretty easy to install .. just click on the Install icon and wait a few minutes. If it all feels too easy, that's because it is.

If you return to Drobo Apps after the installation has completed you'll see something like this:


Go ahead - click on Start. At the time of writing MySQL (5.6.13) on the Drobo 5N (3.1.1) requires perl to create some of the data during the installation. This isn't on the device and the errors don't really share any useful information.

You need to go to the Perl DroboPorts page, scroll to the bottom, and download the perl.tgz linked near the bottom of the page.


To install it you need to use the same method for any downloaded DroboApp: save the *.tgz file into the DroboApps share on the device. Restart the device and the file should disappear, to be replaced by a perl folder. You will NOT see this listed in DroboApps on the dashboard.

Try starting MySQL; if it fails again: uninstall, then reinstall it.

You should now have a running MySQL server. Rejoice!


Only kidding! You've now got a MySQL server that you can't access remotely and can do very little with locally.

Before we can improve the situation we need access to the NAS device. Dropbear is quick and easy to install:

  • download the zipfile from the Drobo App page
  • open the zipfile, then drag "dropbear.tgz" file from Dropbear folder onto the mounted DroboApp share
  • restart the device
  • once the device has completed starting up you should be able to ssh onto it using 'root' as both the username and password; please change this immediately using 'passwd root'.
Now you're in a position to access MySQL and make the required changes.

Find out the password for the root account under MySQL:
     cat /mnt/DroboFS/Shares/DroboApps/mysql/data/.mysql_secret

Connect to MySQL; entering the password you just looked up:
    /mnt/DroboFS/Shares/DroboApps/mysql/bin/mysql -u root -p

Many things you will try to do will result in an error:
    You must SET PASSWORD before executing this statement

Change the password:
    SET PASSWORD = PASSWORD('new-password');

Create a user, and give them (remote) access. As I'm performing the setup for use with XBMC I'll create that user:
    CREATE USER 'xbmc'@'%' IDENTIFIED BY 'xbmc';
    GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'%';
    FLUSH PRIVILEGES;

Now you can use MySQL hosted on your Drobo device!