如何用javascript連接數據庫?用javascript連接MongoDB/MySQL
mongodb有一些例子嗎?或MySQL?此databese的
mongodb://[username:[email protected]]host1[:port1][,host2[:port2],...[,hostN[:portN]]]` `[/[database][?options]]
性能可以在TCP服務器?:
~/$ ./mongod
db.adminCommand({movePrimary :,到:})被用於
//enable sharding on the database, and move it to the shard01
use test1 //新數據庫 db.adminCommand({enabl esharding:「test1」}) db.adminCommand({movePrimary:「test1」,to:「shard01」}) //這將影響test1上的新集合db //在數據庫上啓用分片並將其移動到shard01 使用test1 //新數據庫 db.adminCommand({enableharding:「test1」}) db.adminCommand({movePrimary:「test1」,to:「shard01」}) //這將影響新的集合在TEST1數據庫