For my personal projects, I don’t really run into performance issues with the database. However, it makes sense to me that having separate servers for databases and applications is a good thing. So just for fun, I decided to set up an ansible script for a dedicated database server. It’s mostly pulled from my existing server setup scripts, but with the extra SSL steps and obviously nothing that isn’t required for the database. I put the code and some setup instructions on GitHub.
Right now, the most useful database for me is MySQL. It’s kind of the default for PHP stuff. And it’s the only option for WordPress without a plugin. I don’t really do enough SQL administration or benchmarking to have a preference for one of the other. I first learned database design with SQL Server. It was very difficult to install at the time, and not available on Linux. So when I got into Rails development, I was pretty happy with PostgreSQL. I have also had to use Oracle for work. Again, not an easy one to install or manage.
So I may add PostgreSQL to this script, or just make two different roles that can be combined if needed. I have just recently started working on making my own ansible roles. I should spend some more time looking through some of the open source roles available. There are problem ones available for everything I need to do, but for right now I enjoy learning how to do just what I need.