MpDatabase Startup Guide

Hi All,

I made a MpDatabase startup guide a while back that can help getting started on it.
I had no prior SQL knowledge and this is just how I got it started.

1 SQL Server
The SQL server is the data management system that will store the tables needed for the application.
Install SQL Server 2017 Express (SQLEXPR_x64_ENU.exe)
• Follow the steps in the following pictures

Figure 1 : In the window that opens, choose the entry “New SQL Server stand-alone installation or add features to an existing installation”

Figure 2 : Only the Windows Firewall check should show a Warning!

Figure 3 : Choose “Perform a new installation of SQL Server 2017” as Installation Type

Figure 4 : Choose Features to Install

Figure 5 : Choose Instance Name

Figure 6 : Continue to “Database Engine Configuration”. Here the Authentication Mode must be set to Mixed Mode! Otherwise MpDatabase will not be able to connect. The specified password is for the user ‘sa’.

Figure 7 : Wait for Installation to complete! You should then see the following window.

2 SQL Server Management Studio
The SQL Server Management Studio is a graphical user interface that allows interaction with the database. It allows users to manually create, alter and delete tables, users and databases.

Download and install SQL Server Management Studio:

Follow the installer steps until the installation is done.
Open the SQL Server Management Studio.

Figure 8 : The login can be done either with the user sa or with your local windows account

On the left pane, right-click on Databases and create a new database.

Figure 9 : The name must be the same as in the MpDatabase configuration file

On the left pane, expand Security and right-click on Logins.
Add a new login.

Figure 10 : Choose the Username and Password of your choice (Must match the MpDatabase Configuration). The password expiration must be unchecked.

Figure 11 : The role sysadmin must be given so MpDatabase can have access to everything

Figure 12 : The user needs to be included in the database and have the db_owner role

Figure 13 : The database connection must be granted and the login must be enabled

3 Python script
3.1 Python version
Look at the mapp services version.
If the version is 5.12 or later, install Python 3.8.2. Otherwise install 2.7.

(Reference: Help → Services, mapp Services, mappDatabase, Concept, Connecting to the database, Installing the server, Defining the Python script)

Figure 14 : When the right version is chosen, the bottom of the page offers multiple ways of installing python

Figure 15 : When installing Python, The Python 3.8 needs to be added to Path

3.2 Database connector
Download the database connector and install it.
If python was installed correctly, the installer will do everything automatically.
(Reference: Help → Services, mapp Services, mappDatabase, Concept, Installing the server)

3.3 pyodbc
Download and install the pyodbc python library. To do so, open the Windows command prompt (cmd) and type in the line shown in Figure 16.

Figure 16 : pyodbc library install procedure

**If no connection to internet, pyodbc can be downloaded as a .whl file here:

The file and path names must be specified when using the offline installation.
4.0.32 is the pyodbc version, cp38 means the python version is 3.8 and win_amd64 means it is for Windows 64 bits.

Figure 17 : pyodbc command line when offline

3.4 Starting the script
Download the mappDatabaseConnector following the help guide and put it on the PC with the database.
(Reference: Help → Services, mapp Services, mappDatabase, Concept, Installing the server, Defining the Python Script)

• Create a .cmd file with the following line:

start python 12000 49894 mssql

(Reference: Help → Services, mapp Services, mappDatabase, Concept, Installing the server, Starting the script)

• Create a shortcut to the file.
• Right-click the shortcut and select Cut.
• Press Start, type run and press Enter.
• In the run window, type shell:startup to open the startup folder.
• Paste the shortcut into the startup folder

4 Database configuration
Open SQL Server Configuration Manager and navigate to the Protocols for (Select the instance you have installed).

Figure 18 : Double-Click on TCP/IP

Figure 19 : Set Enable to “Yes”

Figure 20 : Change the TCP Dynamic Ports of the IPAll.
The port you enter has to be free and cannot be used by any other app.
The port you enter here is needed for the python script to be able to connect.

Apply and close. Still in the Sql Server Configuration Manager, click on SQL Server Services.

Figure 21 : Restart all Running services (Right-Click → Restart).

You may close all windows.

5 Firewall
Search and open the Windows Defender with Advanced Security.

Figure 22 : Windows Defender Firewall in Windows Start Search

Figure 23 : Double-click on Each Python Inbound Rules to Enable Them

Figure 24 : Click on “New rule” to enable communication to the database and MpDatabase

Figure 25 : Select Port for All Added Rules

Figure 26 : Add the Needed Ports and Protocols

The ports 12000 (MpDatabase Configuration) and 49894 (SQL Server Configuration) need to be allowed for both TCP and UDP and inbound/outbound. If more than 1 MpDatabase is connected to the same SQL server, 100 ports can be opened by specifying 12000-12099.


Thanks for the guide! I recently was getting started with MpDatabase too and tried out mySQL instead of Microsoft SQL Server. I specifically liked having the mySQL Workbench software for additional troubleshooting.

The mySQL Server was pretty straightforward. Are there any particular features for the Microsoft SQL Server that you like and that I should check out for myself?

1 Like

To be honest I went with SQL Server Express because it was in the original presentation. SQL Server Management Studio (SSMS) works pretty well so I never questioned other alternatives.
I made a quick Google search and they seem fairly similar.
They say SQL Server Express is free but is capped at 4GB and is single CPU unless you pay for the SQL Server upgrade.
On the other hand MySQL is less stable in case of a power failure.

1 Like