代码改变世界

随笔档案-2014年03月

mongodb学习(一)

2014-03-08 14:10 by 很大很老实, 150 阅读, 收藏,
摘要: 操作系统环境:ubuntu。 安装mongodb:apt-get install mongodb 安装后运行:mongod提示:[initandlisten]exceptionininitAndListen: 10296dbpath(/data/db) does not exist, terminating 发现没有/data/db这个目录,创建目录后,mongod运行OK。 基础性的命令: 1)show dbs:显示所有的数据库 2)use aomidbs:创建aomidbs数据库,不过,要在使用以后才保存。 阅读全文