Connect to MySQL datasource only if the database is regenerated.