MongoAdmin admin = new MongoAdmin(); for(String s : admin.getDatabaseNames()){ System.out.println(s); } //获取数据库对象 Mongo m = admin.getDB(“mydb”); //删除数据库 admin.dropDatabase(“mydb”);