Creates connection thread to MySQL database