Creating data connections

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:

  1. Click on the Administration tab in the left-hand pane.
  2. 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:
    Creating data connections
  3. Click the plus (+) button in the title pane to add a new connection.
  4. 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.

  5. Click on the Test button. If everything is ok, a successful notification dialog appears.
  6. Click on the OK button to finish the process.
  7. The PHIMinimart connection is now available as your data source. The following screenshot shows the new, defined database connection:
    Creating data connections

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:

  1. In the File menu, click on New and select Data Source....
  2. If the Data Source Wizard appears, fill in the following configuration:
    • Data Source Name: PHIDataSource
    • Source Type: Database table(s)
  3. 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:
    Creating data connections
  4. If the Database Connection dialog appears, type in the following configuration values:
    • Connection Name: PHIMinimart2
    • Database Type: Generic Database
    • Custom Connection URL: jdbc:mysql://localhost/phi_minimart
    • Custom Driver Class Name: com.mysql.jdbc.Driver
    • User Name: root
    • Password: (none)
  5. 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:
    Creating data connections
  6. Click on the OK button.
  7. Now you have a new, defined connection. The following screenshot shows a new connection in PUC.
    Creating data connections
  8. For the sole purpose of creating a connection, I'll not continue to the next step in the wizard. Click on the Cancel button.
  9. 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:
    Creating data connections

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset