mv database connection code to class.mysql.php