Fixing the MySQL connection