Index Changes

Connecting to a MySQL Database

This topic demonstrates setting up a connection to a MySQL database from GlassFish ESB — NetBeans IDE 6.1.

Connections to databases are managed using database drivers, which enable applications written in different programming languages to interact with the database management system. GlassFish ESB — NetBeans IDE 6.1 comes bundled with the MySQL Native (mysql-connector-java-5.1.5-bin.jar), which is a Java implementation of the JDBC API, and communicates directly with the MySQL Driver. TCMySQLDB

To Connect to a MySQL Database

1   Click Services tab.

2   Expand the Drivers node from the Database Explorer. Right-click the MySQL (Connector/J driver) and choose Connect Using....
     The New Database Connection dialog box is displayed.

Image shows ...

3    In the Basic Setting tab, enter the Database's URL <HOST>:<PORT>/<DB> in the corresponding text field.
      The URL identifies the type and location of a database server.
       In this example, specify the host name (that is, the location of the server), the port number on which the database communicates, and the name of the database instance.
       In this case you can enter: jdbc:mysql://localhost:xxxx/MyNewDatabase.

4    Enter User Name and Password.

Note - Select the Remember password option. This is optional.
Image shows ...

5    Click OK to accept the credentials.
      This displays a new Connection node in the Database Explorer under the Databases node.

Image shows ...

6    Click OK to accept the default schema.

7    Right-click the MySQL Database URL in the Services window (Ctrl-5). Click Connect.
      This opens the New Database Connection dialog box.

Image shows ...

    The illustration shows that the Database Connection is enabled.

Image shows ...

    You are now connected to the MySQL RDBMS in the IDE.


Previous

Next
Working With Administration Console

See Also



Return to Using the Database Binding Component

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-20) was last changed on 14-Jan-09 08:46 AM, -0800 by PRABHAMS