I'm trying to use mongodb for the first time and did the installation using macports after that.
In a terminal I run the mongod. In another run the mongo command.
In the mongo terminal I try to execute the import command but I can not, it gives the following error already mentioned in the title of the question.
E QUERY SyntaxError: Unexpected identifier
My server is uploading with the following message:
2015-11-14T23:33:09.540-0200 E NETWORK [initandlisten] listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017 2015-11-14T23:33:09.541-0200 E NETWORK [initandlisten] addr already in use 2015-11-14T23:33:09.581-0200 I JOURNAL [initandlisten] journal dir=/data/db/journal 2015-11-14T23:33:09.581-0200 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed 2015-11-14T23:33:09.628-0200 I JOURNAL [durability] Durability thread started 2015-11-14T23:33:09.628-0200 I JOURNAL [journal writer] Journal writer thread started 2015-11-14T23:33:09.628-0200 I CONTROL [initandlisten] MongoDB starting : pid=1302 port=27017 dbpath=/data/db 64-bit host=MacBookPro-HeltonWebDeveloper.local 2015-11-14T23:33:09.628-0200 I CONTROL [initandlisten] 2015-11-14T23:33:09.629-0200 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 2015-11-14T23:33:09.629-0200 I CONTROL [initandlisten] db version v3.0.7 2015-11-14T23:33:09.629-0200 I CONTROL [initandlisten] git version: nogitversion 2015-11-14T23:33:09.629-0200 I CONTROL [initandlisten] build info: Darwin MacBookPro-HeltonWebDeveloper.local 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_59 2015-11-14T23:33:09.629-0200 I CONTROL [initandlisten] allocator: system 2015-11-14T23:33:09.629-0200 I CONTROL [initandlisten] options: {} 2015-11-14T23:33:09.999-0200 I CONTROL [initandlisten] now exiting 2015-11-14T23:33:09.999-0200 I NETWORK [initandlisten] shutdown: going to close listening sockets... 2015-11-14T23:33:09.999-0200 I NETWORK [initandlisten] shutdown: going to flush diaglog... 2015-11-14T23:33:09.999-0200 I NETWORK [initandlisten] shutdown: going to close sockets... 2015-11-14T23:33:09.999-0200 I STORAGE [initandlisten] shutdown: waiting for fs preallocator... 2015-11-14T23:33:09.999-0200 I STORAGE [initandlisten] shutdown: final commit... 2015-11-14T23:33:10.011-0200 I JOURNAL [initandlisten] journalCleanup... 2015-11-14T23:33:10.011-0200 I JOURNAL [initandlisten] removeJournalFiles 2015-11-14T23:33:10.011-0200 I JOURNAL [initandlisten] Terminating durability thread ... 2015-11-14T23:33:10.107-0200 I JOURNAL [journal writer] Journal writer thread stopped 2015-11-14T23:33:10.107-0200 I JOURNAL [durability] Durability thread stopped 2015-11-14T23:33:10.107-0200 I STORAGE [initandlisten] shutdown: closing all files... 2015-11-14T23:33:10.108-0200 I STORAGE [initandlisten] closeAllFiles() finished 2015-11-14T23:33:10.108-0200 I STORAGE [initandlisten] shutdown: removing fs lock... 2015-11-14T23:33:10.108-0200 I CONTROL [initandlisten] dbexit: rc: 48