It records how to set up MongoDB, a database that is often used for data analysis.
Download link → https://www.mongodb.com/download-center/community
Set the path to C: \ mongodb
(not C: \ Program Files
)
Set to Custom
instead of Complete
and create a new folder under C drive
. ↓
Installation takes about 5 minutes.
After installation, create a C: \ mongodb \ data
folder.
Move the directory with cd C: \ mongodb \ bin
and
(If you use it often, you may register C: \ mongodb \ bin
in the environment coefficient.)
Start the server as a data pass registration:
mongod.exe --dbpath C:\mongodb\data
Success if the following screen appears
I think the reason why it often fails is that C: \ mongodb \ data
is not created.
Set the connection destination of MongoDB GUI to mongodb: // localhost: 27017 /
. (Of course, an error will occur if the server does not start)
(mongodb: //
is required, Port number 27017
is the default setting)
If you can connect, the database table screen will appear and you will be successful. (There should be nothing when you start it for the first time, so please refer to it)
** Qiita **: [Operating MongoDB with python](https://qiita.com/Syoitu/items/db192385a4b2e4884ed5#python%E3%81%A7mongodb%E3%82%92%E6%93%8D%E4 % BD% 9C% E3% 81% 99% E3% 82% 8B) is very easy to understand, so please check it.
Be sure to start the server before connecting with Python every time.
YouTube-MongoDB In 30 Minutes https://www.youtube.com/watch?v=pWbMrx5rVBE
Qiita-Getting Started with MongoDB with python https://qiita.com/Syoitu/items/db192385a4b2e4884ed5#%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83% AA% E3% 81% AE% E3% 82% A4% E3% 83% B3% E3% 82% B9% E3% 83% 88% E3% 83% BC% E3% 83% AB
Recommended Posts