KB#01055-How to configure MySQL JDBC for use by BBj
How to configure MySQL JDBC for use by BBj
Download the MySQL Connector/J from MySQL.
Unzip/untar this per the MySQL instructions. Next make the .jar file visible to BBj. Go into the BBj Enterprise Manager and open up the Java Settings dialog. Add the path to the mysql-connector-java-[version]-bin.jar file to the BBj classpath.
Stop and restart BBj Services.
Add the following line to your SQL.ini file:
This will load the driver into memory when a BBj interpreter session starts.
Next add an entry to the SQL.ini file as an alias to your database. You will need to construct a JDBC connection string. The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional:
If the hostname is not specified, it defaults to '127.0.0.1'. If the port is not specified, it defaults to '3306', the default port number for MySQL servers.
Starting with version 3.0.12 and 3.1.2, Connector/J supports multiple hosts with ports, separated by commas:
For example, if you have a database called "mydata" on the local machine, add the following to the SQL.ini file:
Here is a sample to access the MySQL data base in your BBj code:
SQLOPEN(1, mode="UID=myname,PWD=mypass") "MyDatabase"
Last Modified: 07/07/2004 Product: BBj
BASIS structures five components of their technology into the BBx Generations.