I’ve wanted to have a local and always running database to play with for a while and though cloud databases are interesting and appealing for a variety of reasons, my already documented love of the Raspberry Pi led to the inevitable conclusion that I’d use one as a database server. While this isn’t a surprising turn of events, what was surprising is how disgustingly easy it was to get up and running very quickly.

My Plex server has been in place for a good while now, dutifully serving up media that might otherwise be forgotten or unavailable elsewhere, but it’s not taxed in terms of usage so it was the logical candidate for double jobbing as a DB server too. MySQL was the choice of weapon for an RDBMS for all the reasons that make it such a popular choice for web applications everywhere.

The install process was made simple by the fact that Ubuntu is the OS on my Raspberry Pi, meaning that the MySQL install was as easy as:

sudo apt install mysql-server

With MySQL on board all that remained to get up and running was to configure access by enabling remote (non-localhost) connections and creating a user that has the ability to connect from a remote client machine. With those steps done it was over to MySQL Workbench to test the connection.

All very simple and straightforward, with only one little configuration change needed to accommodate the unusual server hardware and that was to move the location of the datafiles off the SD card the Raspberry Pi uses for primary storage and onto the SSD drive I’ve been using for media files for the Plex system.

The Raspberry Pi provides wonderful opportunities to try out things very quickly, even odd ideas like running database servers on what would normally be considered under-powered hardware for such a task. All in all, this task took less than an hour from start to finish, though the bigger job of putting some useful data into the database will, I suspect, take much longer.

Leave a Reply

Your email address will not be published. Required fields are marked *