布衣王子

Email:roose2008@gmail.com QQ:79212131

求高手翻译 Connecting to the MySQL RDBMS

Connections to databases are managed using database drivers, which enable applications written in different programming languages to interact with the database management system. NetBeans IDE 6.0 comes bundled with the MySQL Connector/J driver, which is a pure Java implementation of the JDBC API, and communicates directly with the MySQL server using the MySQL protocol.

Begin by examining the functionality offered by the Database Explorer located in the IDE's Services window (Ctrl-5). The Database Explorer is represented by the Databases node (database node icon). From this interface you can connect to database servers, view current connections, add database drivers, as well as create, browse or edit database structures.

Now that you have the MySQL database server installed and configured, you can connect to it from the NetBeans IDE using the Database Explorer. Note that you are connecting to the database server. In the next step, you will create a database instance through this connection. Do the following:

  1. In the Database Explorer, expand the Drivers node, then right-click the MySQL (Connector/J driver) and choose Connect Using. The New Database Connection dialog displays.
  2. In the Database URL field, replace the default <HOST>:<PORT>/<DB> with a forward-slash (/) so that the entry now reads: jdbc:mysql:///.
  3. For User Name and Password, enter root and nbuser, respectively. Optionally, select the Remember password option.
  4. Click OK, then click OK again to accept the default schema and exit the dialog. A new Connection node displays in the Database Explorer under the Databases node:

    new connection node displayed in database explorer

You are now connected to the MySQL RDBMS in the IDE. Note that the new connection node icon appears whole (connection node icon) when you are connected to a database. Likewise, it appears broken (broken connection node icon) when there is no connection.

At later stages, when working with databases through the Database Explorer, you may need to manually connect to a database. You can do so by right-clicking the broken database connection node and choosing Connect.

posted on 2008-09-25 09:28 草包书生 阅读(924) 评论(6)  编辑  收藏

评论

# re: 求高手翻译 Connecting to the MySQL RDBMS 2008-09-25 09:39 日月雨林

这个其实说的很简单,就是教你如何连接上mysql 而已.
现在的netbeans 要连接上 mysql 太简单了.
看看这篇博客
http://developers.sun.com.cn/blog/qixun/entry/%E4%BD%BF%E7%94%A8netbeans%E6%93%8D%E4%BD%9Cmysql%E6%95%B0%E6%8D%AE%E5%BA%93  回复  更多评论   

# re: 求高手翻译 Connecting to the MySQL RDBMS[未登录] 2008-09-25 09:56 sclsch

连接mysql的字符串类例这样:
datasource.url=jdbc:mysql://localhost:3306/ssh?useUnicode=true&characterEncoding=UTF-8
datasource.username=root
datasource.password=rootcharacterEncoding=UTF-8
改成你自己的。  回复  更多评论   

# re: 求高手翻译 Connecting to the MySQL RDBMS 2008-09-25 09:59 sclsch

连接mysql的字符串类例这样:

datasource.url=jdbc:mysql://localhost:3306/ssh?useUnicode=true&characterEncoding=UTF-8

datasource.username=root
datasource.password=root

改成你自己的  回复  更多评论   

# re: 求高手翻译 Connecting to the MySQL RDBMS[未登录] 2008-09-26 11:15 草包书生

@日月雨林
问题已解决,谢了。  回复  更多评论   

# re: 求高手翻译 Connecting to the MySQL RDBMS[未登录] 2008-09-26 11:15 草包书生

@sclsch
问题已解决谢谢  回复  更多评论   

# re: 求高手翻译 Connecting to the MySQL RDBMS[未登录] 2010-09-15 15:50 小D

你后来怎么解决的 0.0   回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 

导航

常用链接

相册

java的相关连接

最新评论