jbx添加加mysql驅動

來源:互聯網
上載者:User
jbx添加加mysql驅動

2004-11-27 15:57:49  By: 磚頭  View:
517配置環境:

1、Windows 2000

2、JBuilder 8 Enterprise

3、MySQL 4.0.15

4、MySQL 的JDBC driver 3.0.9 ,下載網址:http://www.mysql.com/downloads/api-jdbc-stable.html

本文對JBuilder和MySQL的安裝不在此累訴,重點從MySQL 的JDBC driver談起。

        首先,解開MySQL 的JDBC driver的壓縮包,其實在這個包中真正有用的就是mysql-connector-java-3.0.9-stable-bin.jar,所以我直接把它放到c:systemmysql-jdbc(這個目錄可以自己定義)下

在JBuilder中,做如下的操作:

一、選擇Tool -> Configure Libraries,在Configure Libraries視窗中選擇左邊列表框下的New,彈出New Library Wizard 視窗,在Name中輸入mysql(可以自己定義),Location中選擇User Home,點擊Add,選擇mysql jdbc的路徑:c:systemmysql-jdbc mysql-connector-java-3.0.9-stable-bin.jar,點擊ok(兩次);

二、選擇Project -> Project Properties -> Paths -> Required Libraries -> 點擊Add,選擇第一步驟中添加的User Home下的mysql,點擊ok(兩次);

三、選擇Tool -> Enterprise Setup -> Database Drivers -> 點擊Add,選擇剛添加的User Home下的mysql,點擊ok,在列表框中出現mysql.config,點擊ok;

四、提示重新啟動JBuilder,設定才會生效,確定後,重啟JBuilder;

五、選擇Tool -> Database Pilot ,在Database Pilot視窗中選擇View -> Options -> Drivers -> 點擊Add

Driver class中輸入:com.mysql.jdbc.Driver

Sample URL中輸入:mysql://localhost/DataBaseName 點擊ok;

六、在Database Pilot視窗中選擇File -> New,在New URL 視窗中,

Driver:從列表中選擇第五步驟建立的com.mysql.jdbc.Driver

URL:將DataBaseName改為存在的資料庫,本例中的URL如下:jdbc:mysql://localhost/test,點擊ok;

七、在Database Pilot視窗中Database URLs列表中雙擊剛建立的url,輸入串連資料庫的使用者名稱、密碼,串連成功。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.