Setting Up a Dedicated Database Server on Raspberry Pi

There is certain gratification when you get a little “naked” mini-computer board to run the software you install on it. Maybe even your own application. Most (if not all) of the real-world applications I have implemented connect in one way or another to a database. It’s not a secret that relational databases are the most popular option in mission-critical applications that require truly ACID compliance. So, installing a good performant SQL database in a Raspberry Pi is, to say the least, a fun exercise to do. Even though the Raspberry Pi can connect to the Internet and consume a Database as a Service (DBaaS) like SkySQL, smaller applications might benefit from having a local-only database running on the same device.

In this article, I show you how to install and set up a MariaDB server on a Raspberry Pi 4 Model B with 8 GB of RAM that you can connect to your local network through WiFi or Ethernet. You can use models with much less RAM memory as well.