[Backend][MySQL] Fixed maintenance/management commands to work with multiple connections.