CodeIgniter Forums
Database optimized ubuntu setup - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: Best Practices (
+--- Thread: Database optimized ubuntu setup (/showthread.php?tid=62156)

Database optimized ubuntu setup - FlevasGR - 06-14-2015

Hello fellow coders. Currently I'm studying how to use nginx with docker and codeigniter and deploy the entire thing to  Amazon elastic beanstalk.. Pretty much everyone recommends a separate database server which  in amazons case you can pay few bucks more and get a scalable database but that's not fun for me because I want to learn how stuff works in the first place. Obviously the best practice is to setup a new instance and install the database software -in that case Maria db for me -  but is that all you need the do?  What kind of optimization should I make I order to have a production ready database? 

RE: Database optimized ubuntu setup - Diederik - 06-14-2015

First, security, be shure you have blokked external trafic in your firewall directly to the database. If you install some tool like phpmyadmin use something like fail2ban or some extra level of security like htaccess ip whitelist for example.

For performace wise it all depents on you application queries, database size, and the server resources (cpu,mem, io). You can start off with some default settings, for mysql there are a few standard examples for different servers (high memory vs low momory) inside the docementation dir (at least for mysql). There are tools wich can help you fine tune these settings, they analyse the log files and make some suggestions. Mysql tuner perl script for example is one I have used.