node.js 如何从 Windows 卸载 mongodb

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45497069/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 18:24:18  来源:igfitidea点击:

How to uninstall mongodb from Windows

node.jswindowsmongodbcommand-prompt

提问by dexter00x

I saw a tutorial that said to run this:

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

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

but that command does not work since there is no mongod.conffile 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?

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

I am using Windows 8.1.

我正在使用 Windows 8.1。

回答by Jim

The command...

命令...

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

Is used to just remove the service.

用于刚刚删除服务。

If you don't have a mongod.confand/or no longer have the .msiinstaller (who keeps that stuff?) then:

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

  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.
  1. win-key + r 并运行 regedit
  2. 导航到Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MongoDB(或只是剪切并粘贴此路径)
  3. 在那里右键单击 MongoDb 并单击删除。现在服务没了。
  4. 转到 C:\mongodb (或您安装它的位置)并删除目录。Mongodb 现在不见了。

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

检查你的系统环境变量,看看它是否在你的路径中(除非你把它放在那里,否则它不会存在)。

A very good database, Primarily doing Drupal development and mostly use MySql for general purpose database.

一个非常好的数据库,主要做Drupal开发,主要使用MySql做通用数据库。

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

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

EDIT: 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

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

回答by clusterBuddy

Since you're using Windows, just run the same .msifile that you installed it with.

由于您使用的是 Windows,只需运行与.msi安装它时使用的相同文件即可。

It should be in your downloads folder, i'm guessing.

我猜它应该在您的下载文件夹中。

Once you opened the file, press next and there you will have the complete access to remove your MongoDB installation.

打开文件后,按下一步,您将拥有删除 MongoDB 安装的完整访问权限。

回答by Gaurav Jain

Use the command below to delete the service:

使用以下命令删除服务:

  • run cmd as Administrator
  • sc delete MongoDB
  • 以管理员身份运行cmd
  • sc delete MongoDB

回答by lazy_programmer

  1. Run the mongo-db installation file that ends with .msi.
  2. You'll see the remove option there, click on it.
  3. Then you could delete the mongo-db files that are in your computer.
  1. 运行以 .mongo 结尾的 mongo-db 安装文件.msi
  2. 你会在那里看到删除选项,点击它。
  3. 然后您可以删除计算机中的 mongo-db 文件。

回答by karunakar chappidi

  1. Go to services.msc and stop MongoDb service .

  2. Delete all the folders in C: drive where MongoDb Folders exists. Remove data folder if you created previously.

  3. Type cmd in start and ryt click on cmd and select run as

  1. 转到 services.msc 并停止 MongoDb 服务。

  2. 删除 MongoDb 文件夹所在的 C: 盘中的所有文件夹。如果您之前创建,请删除数据文件夹。

  3. 在开始输入 cmd 并点击 cmd 并选择运行方式

administrator and type below Command. sc delete MongoDB If it throws some error like service not exists then open properties of the service and check whether you are giving the proper service name.

管理员并在下面键入命令。sc delete MongoDB 如果它抛出一些错误,如服务不存在,则打开服务的属性并检查您是否提供了正确的服务名称。