To connect to a database you first need to do the following:
When you create a database connection, you supply the details needed to connect to a specific database. The details needed to connect to a database include the location of the database, which driver to use and the username and password information.
After you create the database connection you can do the following:
To create a new connection:
Alternatively, expand the Drivers node, right-click your driver's instance node and choose Connect Using.
This URL typically begins with jdbc:and a short code name for the driver, followed by another colon. The rest of the URL depends on the type of driver you are using. For example, you might need to specify a host and port; alternatively, the name of a database file might suffice, or an ODBC DSN. For MySQL, the Database URL might look as follows:
jdbc:mysql://localhost:3306/mydatabaseTo help you get started, the IDE provides templates for the correct URL format for the most common drivers. If in doubt, refer to the documentation for the driver that you are using.
If selected, you will not be prompted for the user name and password on subsequent connections to the database. To change this property, right-click the database connection node in the Services window and choose Properties and unselect the Remember Password property in the Properties window.
If the connection is successful, the database connection node appears as
a subnode of the Databases node. The database connection node appears whole ( )
indicating the database is connected.
When the database is connected, you can expand the database connection node to see the child folders
representing lists of tables, views and procedures.
For more, see Browsing Structures.
If the connection attempt fails, the IDE displays a dialog box indicating it was unable to add the connection. Check the connection information for the database in the New Database Connection dialog box.
To disconnect from the database:
You cannot browse the database until you reconnect to the database.