I want to rename the database that I've created in mongodb shell, however I used db.copyDatabase function but it did not work it gave an error saying
WARNING: db.copyDatabase will only function with MongoDB 4.0 and below. See http://dochub.mongodb.org/core/4.2-copydb-clone { "ok" : 0, "errmsg" : "no such command: 'copydb'", "code" : 59, "codeName" : "CommandNotFound" }
Please can anyone suggest which command should be used to rename the database?