I just wanted to take a look at Mongo-DB. But i just don't get it running. I've installed it with PECL and my phpinfo()
tells me that the extension is loaded, but when i try to get a connection with
$mongo = new Mongo();
I get this:
Fatal error: Uncaught exception 'MongoConnectionException' with message ': Transport endpoint is not connected'
Anybody have the same Problem? ... Or any Idea on this?
check out whether server is running or not..
/etc/init.d/mongodb start
then go to
root@kannan-desktop:~# mongo MongoDB shell version: 1.6.3 connecting to: test >
Don't forget to change the IP in your
mongod.conf
if it's a new installation.custom string looks like that
just write
mongod
in your terminal and will work wellany server start method, such as "/etc/init.d/mongodb start" or "service start mongodb" will fail, if a stale lock file still exists. In Ubuntu/Debian this is /var/lib/mongodb/mongod.lock. Look for this and delte it, if it exists and seems to be an old one.
First Change the Default db path by following command
$ sudo mkdir -p /data/db/
$ sudo chown
id -u
/data/dband then the final command is..
$ mongod --journal
Do not close terminal until you are working with mongoDB
It works for me...