How to add mongodb service under Windows 10?

clipboard.png
the previous command is as follows:

mongod --logpath C:\mydatabase\logs.txt --logappend --dbpath C:\mydatabase --serviceName MongoDB --install

however, there is no prompt on the command line after entering the carriage enter, and the service has not been added successfully.
I have tried some methods on the Internet that do not work. Is there a correct one available?

Feb.26,2021

"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.6\mongod.cfg" --install

net start MongoDB
3.4
win10mongoDb

problem solved, open cmd, as an administrator or enter this command. Note that you cannot create a service when you open mongodb.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bcf832-30c7e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bcf832-30c7e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?