Fix environment overwriting for mysql commands