MongoDB-Start & Connect database

Source: Internet
Author: User

1> starting the database

1.1> Add the following directories in turn:

1.1.1> Mongodb-space

1.1.2> mongodb-space/conf

1.1.3> Mongodb-space/data

1.1.4> Mongodb-space/log

1.2> Add the global-6969.conf file under the mongodb-space/conf directory.

1.3> writes the following configuration to the global-6969.conf file:

Port = 6969bind_ip = Localhostdbpath =/users/morton/mongodb-space/data/global-6969logpath =/Users/Morton/ Mongodb-space/log/global-6969.loglogappend = Truepidfilepath =/users/morton/mongodb-space/data/global-6969/ Global-6969.pidfork = True

1.3.1> Note: The path configuration in which you use the absolute path is based on your native environment.

1.4> executes the mongod-f/users/morton/mongodb-space/conf/global-6969.conf command, which starts the database.

1.4.1> tip: This step is to create & start the MongoDB database service instead of the database, where you can create multiple databases.

1.4.2> tip: The data file is stored in the directory specified by the global-6969.conf file DBPath entry.

2> Connection Database

2.1> executes the MONGO Localhost:6969/susulink command, that is, the database is connected and the database name is Susulink.

MongoDB-Start & Connect database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.