1

I'm using Ubuntu 16.04 and MongoDB 4.0.1. When I use mongo shell I got this :

I STORAGE  [initandlisten] 
I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
I CONTROL  [initandlisten] 
I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
I CONTROL  [initandlisten] 

So I read lot of threads about this problem but nothing works... I created my users as it said here and login with my created users but I got again the same warnings.

I don't have created the data/db folder. I don't know if it's necessary in 4.0.1 version. It's confused for me. Inside my mongod.conf I got this :

storage:
  dbPath: /var/lib/mongodb

Should I let this config or should I rename to :

storage:
  dbPath: /data/db

I don't know what to do. Can you help me please ?

John
  • 4,711
  • 9
  • 51
  • 101

1 Answers1

1

Creating a user is not enough. After creating your user, you also need to start the server with access control turned on. (That is the --auth command line option.)

Go over the steps here:

https://docs.mongodb.com/manual/tutorial/enable-authentication/

nagylzs
  • 3,954
  • 6
  • 39
  • 70