Add MySQL driver to JBX
2004-11-27 15:57:49 by: Brick View:
517 configure the environment:
1. Windows 2000
2. JBuilder 8 Enterprise
3. MySQL 4.0.15
4, MySQL JDBC driver 3.0.9, download URL: http://www.mysql.com/downloads/api-jdbc-stable.html
This article does not complain about JBuilder and MySQL installation, but focuses on the JDBC driver of MySQL.
First, uncompress the MySQL JDBC driver package, in fact, in this package is really useful is the mysql-connector-java-3.0.9-stable-bin.jar, So I directly put it in C: systemmysql-JDBC (this directory can be defined by myself)
In JBuilder, perform the following operations:
1. Select tool-> Configure libraries. In the configure libraries window, select new in the list box on the left. The new library wizard window is displayed. Enter MySql in name (which can be customized ), select User Home in location, click Add, select MySql JDBC path: C: systemmysql-jdbc mysql-connector-java-3.0.9-stable-bin.jar, click OK (twice );
2. Select project-> project properties-> paths-> required libraries-> click Add, select MySql under the user home added in step 1, and click OK (twice );
3. Select tool-> enterprise setup-> database drivers-> click Add, select MySql under the newly added user home, and click OK. MySQL is displayed in the list box. config and click OK;
4. Prompt to restart JBuilder to make the settings take effect. After confirmation, restart JBuilder;
5. Select tool-> Database Pilot. In the Database Pilot Window, select View-> options-> drivers-> click Add.
Enter com. MySQL. JDBC. Driver in Driver Class
Enter MYSQL: // localhost/databasename in the sample URL and click OK;
6. Select File> new in the Database Pilot Window. In the new URL window,
Driver: Select com. MySQL. JDBC. Driver created in step 5 from the list.
URL: Change databasename to an existing database. In this example, the URL is JDBC: mysql: // localhost/test. Click OK;
7. In the Database Pilot Window, double-click the URL you just created in the database URLs list and enter the user name and password for connecting to the database. The connection is successful.