To finish the chapter, we will show you how to create a MySQL data connection both in PAC and PUC. Follow these steps to create a new data connection from PAC:
Click on the Administration tab in the left-hand pane.
Click on the Database Connections tab in the center pane. You will see that there is already one connection defined, SampleData. The following screenshot shows the Database Connections tab:
Click the plus (+) button in the title pane to add a new connection.
Fill in the database connection details. The following configurations are taken from my local setup:
Name: PHIMinimart
Driver Class: com.mysql.jdbc.Driver
User Name: root
Password: (none)
URL: jdbc:mysql://localhost/phi_minimart
If you are familiar with Java programming, this configuration is actually the JDBC connection string.
Click on the Test button. If everything is ok, a successful notification dialog appears.
Click on the OK button to finish the process.
The PHIMinimart connection is now available as your data source. The following screenshot shows the new, defined database connection:
For the following activities, you will need to copy the MySQL JDBC library driver from PAC to BI Server. The library is not included in BI Server distribution by default.
In version 4.8, the JDBC filename is mysql-connector-java-5.1.17.jar. Copy the file from PAC/jdbc, navigate to the BISERVER/tomcat/lib folder and paste the file there. Restart the BI Server once you have copied the file.
Follow these steps for creating a new data connection from PUC:
In the File menu, click on New and select Data Source....
If the Data Source Wizard appears, fill in the following configuration:
Data Source Name: PHIDataSource
Source Type: Database table(s)
In the connection setting, click on the green plus (+) icon to create a new data connection. The following screenshot shows Add New Connection from PUC:
If the Database Connection dialog appears, type in the following configuration values:
Click on the Test button. If everything is ok, the dialog showing success should appear. Click on the OK button. The following screenshot shows the successful connection:
Click on the OK button.
Now you have a new, defined connection. The following screenshot shows a new connection in PUC.
For the sole purpose of creating a connection, I'll not continue to the next step in the wizard. Click on the Cancel button.
If you want to make sure the connection already exists, you can recheck the connection list in PAC. The following screenshot shows the connection list in PAC:
Now, we have successfully set up both connections to a MySQL database. We will learn how to use a data connection with several sources later in this book.