Fix the API connection to MySQL