本文介绍了如何从Windows卸载mongodb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到了一个说要运行的教程:

I saw a tutorial that said to run this:

C:\mongodb\bin\mongod.exe --config C:\mongodb\mongod.conf --remove

但是该命令不起作用,因为我的Windows的mongodb文件夹中没有 mongod.conf 文件.此外,我不想仅停止服务,而是删除所有内容,包括文件,服务等.这可能吗?

but that command does not work since there is no mongod.conf file in the mongodb folder in my Windows. Besides, I don't want to only stop the service, but to remove everythin, including files, services, etc. Is that possible?

我正在使用Windows 8.1.

I am using Windows 8.1.

推荐答案

命令...

C:\MongoDB\bin\mongod.exe --config C:\MongoDB\mongod.conf --remove

过去只是删除服务.

如果您没有 mongod.conf 和/或不再具有 .msi 安装程序(谁保留了这些东西?),那么:

If you don't have a mongod.conf and/or no longer have the .msi installer (who keeps that stuff?) then:

  1. win-key + r并运行regedit
  2. 导航到 Computer \ HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ MongoDB (或仅剪切并粘贴此路径)
  3. 在该位置上右键单击MongoDb,然后单击删除".服务现已消失.
  4. 转到C:\ mongodb(或安装位置)并删除目录. Mongodb现在不见了.
  1. win-key + r and run regedit
  2. Navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MongoDB (or just cut and paste this path)
  3. Once there right click on MongoDb and click Delete. Service is now gone.
  4. Goto C:\mongodb (or where you installed it) and delete directory. Mongodb is now gone.

检查系统环境变量以查看其是否在路径中(除非将其放置在路径中,否则将不存在).

Check your system environment variables to see if it's in your path (It will not exist unless you put it there).

或者,您也可以重新下载msi并尝试使用它.

Alternatively you may be able to re-download the msi and try using that.

如果您忘记先停止服务,或者如果它在服务中留下了孤儿孤岛,则以管理员身份打开CMD或其他外壳并运行命令:sc.exe delete MongoDB ...,您应该看到:[SC] DeleteService成功

If you forgot to stop the service first or if it left dead orphan in services then open CMD or other shell as administrator and run the command: sc.exe delete MongoDB ... you should see: [SC] DeleteService SUCCESS

这篇关于如何从Windows卸载mongodb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 13:57