There\'s a typo in my MongoDB database name and I\'m looking to rename the database.
I can copy and delete like so...
db.copyDatabase(\'old_name\', \
There is no mechanism to re-name databases. The currently accepted answer at time of writing is factually correct and offers some interesting background detail as to the excuse upstream, but offers no suggestions for replicating the behavior. Other answers point at copyDatabase, which is no longer an option as the functionality has been removed in 4.0. I've updated SERVER-701 with my notes and incredulity.