MongoDB
南柯一梦,笑谈浮生
这个作者很懒,什么都没留下…
展开
-
MongoDB复制集+认证
一、环境准备1、系统环境[root@mongodb-server ~]# cat /etc/redhat-releaseCentOS Linux release 7.8.2003 (Core)[root@mongodb-server ~]# uname -r3.10.0-1127.el7.x86_64[root@mongodb-server ~]# hostname -IA192.168.100.60[root@mongodb-server ~]# getenforceDisabled[原创 2020-07-08 14:03:43 · 926 阅读 · 0 评论 -
connecting to db server: server returned error on SASL authentication step: Authentication failed.
a原创 2020-07-07 13:27:46 · 5125 阅读 · 0 评论 -
MongoDB集合简单操作
创建集合方法一:use clsn;switched to db clsndb.createCollection(‘a’){ “ok” : 1 }db.createCollection(‘b’){ “ok” : 1 }查看当前数据下的所有集合show collections;abdb.getCollectionNames()[ “a”, “b” ]方法二:当插入一个文档的时候,一个集合就会自动创建。use clsn;switched to db clsndb.c.in原创 2020-07-06 20:13:51 · 147 阅读 · 0 评论 -
mysql数据迁移至mongodb数据库
将mysql数据库中的mysql下的user表导出。 select user,host,password from mysql.userinto outfile '/tmp/user.csv'fields terminated by ','optionally enclosed by '"'escaped by '"' lines terminated by '\r\n'; 命令说明: into outfile '/tmp/data/user.csv' ------导出文件位置原创 2020-07-06 17:13:17 · 389 阅读 · 0 评论