sh.addShard('replicateSet1/host:port');
sh.enableSharding('database');
//Shard key should be index of the collection
sh.shardCollection('db.collection', 'shard key');
sh.status();
Mongodb Sharding Commands
最新推荐文章于 2024-09-14 19:55:29 发布