Fix MySQL connection bug