In this blog we can see how to install mongo db in windows and connect with compass and how to acess mongo using Php with composer. Follow me @ facebook @linkedIn
Installing MongoDb:
1) download mongodb from its official site..(click here to download)
2) click the .exe file and mongodb gets installed.
3) now goto the parent directory in which monodb is installed and create a directory called 'data' and inside the 'data' create a sub directory called 'db'.
4) now to intialize mongo variable goto the installed directory usually it will be
"C:\Program Files\MongoDB\Server\3.6\bin" nad copy that path.
5) goto system properties->advanced system settings->environmental variables in this add this path as a user variables.
6) now open a terminal and type "mongod". it starts the mono database running on local host on the default port 2701..
7) now open a new terminal and type "mongo" it connects with your mongo dtabase.
Installing Compass:
Compass is visualizing tool for mongodb similar to phpmyadmin for mysql.
1) download compass ".exe" file and install it.(click here to download)
2) open it and click connect. if your database is running it connects and provide the visualization of the mongodb.
Installing Php:
1) install xampp server.(click here to download)
2) download php mongo driver and extract the files.
3)copy the php_mongodb.dll file and paste it in xampp->php->ext.
4) now open php.ini file in xampp->php.
5) it open a txt file now paste this command "extension=php_mongodb"
6) save the file and close it.
Installing Composer:
composer is a tool to download and install mongodb package for our project
1)download file and install it..(click here to download)
how to create a project and use of composer will explained in next blog....
Follow me @ facebook @linkedIn.
Installing MongoDb:
1) download mongodb from its official site..(click here to download)
2) click the .exe file and mongodb gets installed.
3) now goto the parent directory in which monodb is installed and create a directory called 'data' and inside the 'data' create a sub directory called 'db'.
4) now to intialize mongo variable goto the installed directory usually it will be
"C:\Program Files\MongoDB\Server\3.6\bin" nad copy that path.
5) goto system properties->advanced system settings->environmental variables in this add this path as a user variables.
6) now open a terminal and type "mongod". it starts the mono database running on local host on the default port 2701..
7) now open a new terminal and type "mongo" it connects with your mongo dtabase.
Installing Compass:
Compass is visualizing tool for mongodb similar to phpmyadmin for mysql.
1) download compass ".exe" file and install it.(click here to download)
2) open it and click connect. if your database is running it connects and provide the visualization of the mongodb.
Installing Php:
1) install xampp server.(click here to download)
2) download php mongo driver and extract the files.
3)copy the php_mongodb.dll file and paste it in xampp->php->ext.
4) now open php.ini file in xampp->php.
5) it open a txt file now paste this command "extension=php_mongodb"
6) save the file and close it.
Installing Composer:
composer is a tool to download and install mongodb package for our project
1)download file and install it..(click here to download)
how to create a project and use of composer will explained in next blog....
Follow me @ facebook @linkedIn.
Comments
Post a Comment