A. Configure Database Connection

Exercise purpose:

To start up Merit and establish a database connection.

 

 

1.  Establish database connection.

The data utilised by Merit is held in an SQL database (mySQL or SQLite). The first step is to connect Merit to the mySQL server or embedded SQLite database.

To establish the connection, select ‘preference’ in ‘File’ menu in the main Merit window. A configuration window is popped up, within which the options of embedded database and MySQL database are available for user to choose.

 

If the option of “Use Embedded Database” is chosen, the text field for specifying the path of SQLite database file becomes editable and the field for specifying the parameters of MySQL Database becomes gray. This option is default one. The path can be changed by clicking the button on the right hand side of text field.

Click ‘OK’ to confirm the defaults.

 

 

 

If the option of “Use MySQL Database” is selected, the text fields for specifying the parameters of MySQL Database connection become editable and the text field for specifying the SQLite database file path becomes gray.

The first time you start Merit you need to define the Data source name, Host/Server name (or IP), user and password.

Click ‘OK’ to confirm the defaults.

 

 

Note: if you want to connect to another MySQL data source you should not need to alter the driver name or port. The Data Source Name: and the Database Name: typically have identical entries. Many companies will have a remote MySQL database server. If that is the case then you need to alter the Host/Server Name and possibly the User and Password.

2. Verify the connection of embedded database.

Once the connection has been established by Merit, the title of the main window will appear with the description of the Merit version number, the SQL server host (i.e. a domain name) and the name of the connected embedded database as shown below.

 

 

 

If the connection fails, an error message appears indicating the attempt to connect to the database file has failed.

Check the path of the database file and try to get the connection again.

 

 

 

 

3. Verify the connection of MySQL database.

Once the connection has been established by Merit, the title of the main window will appear with the description of the Merit version number, the SQL server  host (i.e. an IP address or a domain name) and the name of the connected database as shown below.

 

 

If the connection fails, a ‘Connector/ODBC’ Driver window appears indicating the attempt to connect to the database server has failed.

When clicking the ‘OK’ button, a error message pop-up window shows the cause of the failure. Check the database server and try to get the connection again.

 

 

 

 

 

Exercise result:

You will have confirmed the initial settings and proved you can connect to the database. 

 

Go to Content Page

Next Exercise