MongoDB rename a database

As of now, there is not a straight forward way to rename a MongoDB database. But you can use the following steps to achieve so :

Here, we are trying to rename OLD_DB to NEW_DB

Steps :
1) copy old database to new one using db.CopyDatabase( OLD_DB, NEW_DB )
2) switching to OLD_DB and dropping the database

Mongo Command :

  #Step 1 : Copy database to new name

  #Step 2 and 3, drop OLD_DB
     use OLD_DB