4

I have ugraded my mongo database from 2.6 to 3.6 But when run mongo I have this warning

MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 2.6.2
WARNING: shell and server versions do not match

How to upgrade server version to be v3.6.4 When i google for a result, i always return to pages of installation that i have executed the commands.

Thanks in advance.

user2285831
  • 419
  • 1
  • 5
  • 18
  • I restart and now i have this error in the logs shutting down with code:62 according to this [https://stackoverflow.com/questions/47850004/mongodb-shutting-down-with-code62] ishould delete the folder /data/db, but it didn't resolve the problem – user2285831 Apr 18 '18 at 15:21

1 Answers1

1

You will have to restart your mongod process.

You have some options to use;

Use --shutdown

From the Linux command line, shut down the mongod using the --shutdown option in the following command:

mongod --shutdown

Use kill

From the Linux command line, shut down a specific mongod instance using one of the following commands:

kill <mongod process ID>
kill -2 <mongod process ID>

I hope this helps.

Source: Manage mongod Processes

antzshrek
  • 9,276
  • 5
  • 26
  • 43
  • I restart the process and i have this error in the log : shutting down with code:62 i tried this solution [https://stackoverflow.com/questions/47850004/mongodb-shutting-down-with-code62] but it didn't help NB : i have upgraded from 2.6 to 3.6 – user2285831 Apr 18 '18 at 16:12
  • have you tried upgrading your data? – antzshrek Apr 18 '18 at 16:29
  • I deleted /data/db and when i try to backup my data with : mongorestore -d db_name path/, it returns : Failed: error connecting to db server: no reachable servers – user2285831 Apr 18 '18 at 16:37
  • even mongod --repair returns : shutting down with code:100 – user2285831 Apr 18 '18 at 16:56