April 14, 2010

Published April 14, 2010 by

Create Database Connection in NetBeans

This is a very straight forward and step by step tutorial for creating a new MySQL database connection in NetBeans IDE.

1. Go to the Services window, click right mouse button and press New Connection. If the Services window is not available in the NetBeans window, go to Window menu and select Services.



2. Provide the following information in the new dialog appeared.
    Driver Name: MySQL (Connector/J Driver)
    Host: localhost (if the host is on the local computer otherwise the URL of the host)
    Port: 3306 (it is the default port for the MySQL server, if it is changed in your computer use that one)
    Database: name of the database (inventory in this example)
    User Name: name of the user (root in this example)
    Password: password of the MySQL server



3. Press OK. Database connection is now created.



Now you can use this connection for further tasks.