Install MySQL on Ubuntu 16.04

Run the following script to install MySQL on Ubuntu 16 LTS.

#!/bin/bash

# we must be root to install packages
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

# prevent installer from asking questions
export DEBIAN_FRONTEND=noninteractive

# install mysql
apt-get -y install mysql-server python-mysqldb