Connecting to a MySQL database
- Install MySQL. In this example, MySQL Connector/J 5.1.23 is used.
-
Add a new database driver.
- Open the Site Preferences dialog box and go to the Database Configurations tab.
- Click Configure Database Drivers and then Add to open the Add New Database Driver dialog box.
-
In theAdd New Database Driver
dialog box, specify:
Driver Class: com.mysql.jdbc.DriverURL Format: jdbc:mysql://server:port3306/database?profileSQL=trueDriver File Path: C:/Program Files/MySQL/MySQL Connector J/mysql-connector-java-5.1.23-bin.jarNote: Driver File Path is the location where you placed the JDBC driver file.
-
Create a new database connection.
- Open the Site Preferences dialog box and go to the Database Configurations tab.
- Click New to open the Add New Database Connection dialog box.
-
Specify:
- mysql_sakiraConnection Name:
- Database: mysql
- ConnectionDatabase URL: jdbc:mysql://hostname:3306/sakila?profileSQL=true
- User Name: root
- Password: This is the root password.
- Schema:
sakira
You must manually specify sakira or the name of the database to use.
-
Update the Database Schema
Configurator GUI.
- Open the Database Schema Configurator and open mysql_sakira.
-
Specify:
- Database Connection: mysql_sakila
- Click Import and select one, some, or all of the tables.
- Save the configuration.
-
Configure a database: Inbound protocol
- Open the Network Configurator and configure a database -inbound thread protocol.
-
Specify:
- Database Connection: mysql_sakila
- Table Schema: actor, or one of the imported tables.
- Read Action: SQL Statement: SELECT * FROM sakila.actor;
- Scope: Each row as a record
- Max Row per Read:1000
- Scheduling: Scan Interval: 30