sudo apt-get install mysql-server
#mysql-config is in a different package, which can be installed from (again, assuming debian / ubuntu):
sudo apt-get install libmysqlclient-dev
#if you are using mariadb, the drop in replacement for mysql, then run
sudo apt-get install libmariadbclient-dev