Creates a mysql resource and corrects the code resource.