MongoDB: Production Plugin
MongoDB Uniform Server Series.
The Uniform Server MongoDB Plugin Production installs MongoDB server, the phpMoAdmin browser administration interface and the PHP driver on Uniform Server 6-Carbo.
A Windows interface is provided allowing you to start and stop MongoDB server. From this interface you can start either the mongo-client or a cmd prompt. These allow you to administer mongo-databases.
From the drop-down menus you can create and delete databases. In addition, you can assign and delete users for a database. You can also run phpMoAdmin.
Production in this context is referring to authenticated access. All databases are assigned a user name and user password. Creating a database you are forced to provide a name and password.
The Admin database is pre-configured with a name and password of root and root respectively. The first task after installation is to change the Admin default password.
Download and Install
- Download file mongo_pro_plugin_v1_0.exe from Sourceforge
- Save it to folder UniServer.
- To extract files, double click on file mongo_pro_plugin_v1_0.exe, no need to change the path.
- A new file Start_MongoDB.exe is added to folder UniServer. Note: Double click to run MongoDB control window.
- Download file mongo_pro_plugin_v1_0.zip from Sourceforge
- Save to any folder e.g temp
- Extract files, navigate to folder temp\mongo_pro_plugin_v1_0
- Copy contents of this folder to folder UniServer
- Double click Start_MongoDB.exe runs MongoDB control window.
For download details see MongoDB Introduction (Main Start page)
Start Windows interface
Double click on file Start_MongoDB.exe located in folder UniServer.
The nag pop-up can be infuriating, but you can click no to not display it again at next start up.
Note: If you want to restore the nag pop-up, delete the following file:
Start server click Start Servers button.
Note: With the servers running, greyed out buttons are enabled.
Button toggles displaying Stop Servers
Open cmd Window
Opens a command window and changes to folder:UniServer\usr\local\mongo\bin
Provides access to Mongo’s suite of command-line tools.
Button Start Mongo Client
Opens a command window and runs mongo-client. Button is enabled when servers are running; otherwise is disabled.
Button Run phpMoAdmin
Opens phpMoAdmin in default browser. Button is enabled when servers are running; otherwise is disabled.
Button Help and Information
Opens main read me file in Notepad.
Note 1: When challenged by your firewall, always grant Internet access
Note 2: Plugin is self-contained. No need to run UniTray.
Note 3: This plugin runs as a standard program and not as a service.
Note 4: Status bar is dual function: it displays messages or acts as a progress bar
- Run phpMoAdmin - Runs phpMoAdmin in a browser
- Exit - Close application
- Change Port - Change Mongo listen port
- Change Admin Password - Change default Admin passwordd
- Create Database - Create a new database assign user and password
For an existing database update user password
For existing database assign a new user and password
- Drop Database - Select a datbase and delete it -
- Add User - Addnew user and password to existing database
- Delete User - Select database lists all users select a user and delete
- Help - Displays help file
- About - Displays Components details and version
Both menu items open the same pop-up window
Change Admin Password
These menu items require MongoDB to be running
This pop-up is mufti-purpose
These menu items require MongoDB to be running
New User - No user or password displayed
Existing User - User name displayed
Change password for that user
This plugin includes a test script allowing you to explore.
- Start MongoDB - Double click on Start_MongoDB.exe
- Run Servers - Click "Start Servers" button
Run test script
Type into a browser http://localhost/mongo_test_1.php
Nothing spectacular, it creates a database and display entries as shown on the right.
Click "Run phpMoAdmin" button
Test script creates a database with two entries this allows you to explore phpMoAdmin features.
Generally have a play run mongo-client and explore its capabilities.
Refresh phpMoAdmin to view changes.
When you have finished playing you probably will want to clean up and start afresh.
- Use the drop-down menus and delete any databases you created.
If you are a new user to Uniform Server, welcome. Your website files are placed in folder UniServer\www.
To clean this folder prior to adding your material, you can delete everything except file .htaccess.
Plugins may add to this folder for testing. MongoDB plugin adds a single file mongo_test_1.php which you may delete after testing.
That redundant code I mentioned above is contained in folder alt_control_2
It contains batch files to start and stop MongoDB server.
They use uniserv.exe to run MongoDB hidden in the background.
For convenience, two batch files are provided. One opens a command prompt allowing you to access Mongo’s command line tools, and the other directly runs the Mongo client tool.
Start_mongo.bat - Run MongoDB server hidden Stop_mongo.bat - Cleanly stop MongoDB server monogo_client.bat - Directly runs mongo-client run_cmd.bat - Opens a command window changes to bin folder allowing you to run MongoDB's command line tools uniserv.exe - Uniform Server utility. Runs a program in background.
You can delete folder alt_control. It contains batch/script pairs that are not required.
Installing and running the MongoDB plugin is quick and easy.
Hey! If you don’t like the control interface, change it; MongoDB Tutorial 4 provides details.