自訂資料庫與port
建立資料庫
mongod --port 27018 --dbpath /tmp/mongodb/連接自訂資料庫與port
mongo --port 27018
MongoDB shell version v4.2.1
connecting to: mongodb://127.0.0.1:27018/?compressors=disabled&gssapiServiceName=mongodbLast updated
mongod --port 27018 --dbpath /tmp/mongodb/mongo --port 27018
MongoDB shell version v4.2.1
connecting to: mongodb://127.0.0.1:27018/?compressors=disabled&gssapiServiceName=mongodbLast updated