mongodb的连接

1.连接本地数据库
MongoDB://localhost
mongo --host 远程IP --port 远程端口 -u 帐户名 -p 密码名

我们提供的服务有:成都网站建设、网站建设、微信公众号开发、网站优化、网站认证、江都ssl等。为1000多家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的江都网站制作公司

2.连接远程数据库,使用用户名fred,密码foobar登录localhost的admin数据库。
mongodb://fred:foobar@localhost

3.连接三台mongo服务器
mongodb://localhost,localhost:27018,localhost:27019


当前文章:mongodb的连接
网址分享:http://scyanting.com/article/gjjjhp.html