MongoDB: exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /data/db, terminating

前端 未结 14 1766
轻奢々
轻奢々 2020-12-02 04:37

I created /data/db in root directory and ran ./mongod:

[initandlisten] exception in initAndListen: 20 Attempted to create a lock fi         


        
14条回答
  •  庸人自扰
    2020-12-02 05:13

    you just need to run the command as a super user:

    just type from the terminal: sudo su mongod

提交回复
热议问题