linux权限命令
2015-08-23 19:54
369 查看
1.
The standard connection uri
scheme is not yet supported by all of the drivers. All drivers support an
alternative method of specifying connections if this format is not supported.
2.
The standard connection string
format is as below:
a)
mongodb://
is a required prefix
to identify that this is a string in the standard connection format.
b)
username:password@
are
optional. If given, the driver will attempt to login to a database after
connecting to a database server.
c)
host1
is the only required part
of the URI. It identifies a server address to connect to.
As many hosts as necessary may be specified (for connecting
to replica pairs/sets).
d)
:portX
is optional and defaults
to :27017
if not provided.
e)
/database
is the name of the
database to login to and thus is only relevant if the username:password@
syntax
is used. If not specified the "admin
" database will be used by
default.
f)
?options
are connection
options. Note that if database is absent there is still a /
required between
the last host and the ?
introducing the options.
3.
Options are name=value
pairs
and the pairs are separated either by "&
"" or ";
".
(These options
are not case sensitive):
a)
replicaSet=name
The driver
verifies that the name of the replica set it connects to matches this name. Implies that the hosts given are a seed list,
and the driver will attempt to find all members of the set.
b)
slaveOk=true|false
true
: sending all writes to the primary and
distributing reads to the secondaries. false
:all writes and reads are sent to
primary.
c)
safe=true|false
true
: the driver
sends a getLastError
command after every update to ensure that the update
succeeded.
d)
w=n
The driver adds { w : n }
to the getLastError
command.
Implies safe=true
. Updates will wait for replication to succeed on at least n
machines.
e)
wtimeoutMS=ms
The driver adds { wtimeout : ms }
to the getLastError
command. Implies safe=true
. The timeout for waiting on replication success.
f)
fsync=true|false
true
: the driver adds { fsync : true }
to the
getLastError
command. Implies safe=true
. Force MongoDB to flush all pending writes to the
data files.
g)
journal=true|false
true
: Sync to journal. Implies safe=true
.
h)
connectTimeoutMS=ms
How long a connection can take to be opened before timing
out.
i)
socketTimeoutMS=ms
How long a send or receive on a socket can take before
timing out.
4.
The server will use one thread
per TCP connection, therefore it is highly recomended that your application use
some sort of connection pooling. Luckily, most drivers handle this for you
behind the scenes.
The standard connection uri
scheme is not yet supported by all of the drivers. All drivers support an
alternative method of specifying connections if this format is not supported.
2.
The standard connection string
format is as below:
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
a)
mongodb://
is a required prefix
to identify that this is a string in the standard connection format.
b)
username:password@
are
optional. If given, the driver will attempt to login to a database after
connecting to a database server.
c)
host1
is the only required part
of the URI. It identifies a server address to connect to.
As many hosts as necessary may be specified (for connecting
to replica pairs/sets).
d)
:portX
is optional and defaults
to :27017
if not provided.
e)
/database
is the name of the
database to login to and thus is only relevant if the username:password@
syntax
is used. If not specified the "admin
" database will be used by
default.
f)
?options
are connection
options. Note that if database is absent there is still a /
required between
the last host and the ?
introducing the options.
3.
Options are name=value
pairs
and the pairs are separated either by "&
"" or ";
".
(These options
are not case sensitive):
a)
replicaSet=name
The driver
verifies that the name of the replica set it connects to matches this name. Implies that the hosts given are a seed list,
and the driver will attempt to find all members of the set.
b)
slaveOk=true|false
true
: sending all writes to the primary and
distributing reads to the secondaries. false
:all writes and reads are sent to
primary.
c)
safe=true|false
true
: the driver
sends a getLastError
command after every update to ensure that the update
succeeded.
d)
w=n
The driver adds { w : n }
to the getLastError
command.
Implies safe=true
. Updates will wait for replication to succeed on at least n
machines.
e)
wtimeoutMS=ms
The driver adds { wtimeout : ms }
to the getLastError
command. Implies safe=true
. The timeout for waiting on replication success.
f)
fsync=true|false
true
: the driver adds { fsync : true }
to the
getLastError
command. Implies safe=true
. Force MongoDB to flush all pending writes to the
data files.
g)
journal=true|false
true
: Sync to journal. Implies safe=true
.
h)
connectTimeoutMS=ms
How long a connection can take to be opened before timing
out.
i)
socketTimeoutMS=ms
How long a send or receive on a socket can take before
timing out.
4.
The server will use one thread
per TCP connection, therefore it is highly recomended that your application use
some sort of connection pooling. Luckily, most drivers handle this for you
behind the scenes.
相关文章推荐
- linux软件包管理
- linux搜索命令
- linux文件命令
- linux文件压缩命令
- linux下mysql的root密码忘记解决方
- Linux学习笔记――Linux基础命令总结
- Linux C++ 服务器端学习方法
- Linux学习日记--基础命令(1)--ls,帮助,LFS
- CentOS6配置本地光盘yum源
- linux:vim基础
- 820作业,常用命令
- Arch Linux 下Android 源码的下载以及编译
- Linux 脚本初探
- linux默认头文件
- linux安装mysql yum No package mysql-server available.
- 在MAC下如何用SSH连接远程LINUX服务器
- Linux常用命令和简单知识
- linux下sudo增添日志文件
- Linux 添加交换分区的步骤
- linux 命令 - 分区格式化命令 mkfs