I have just installed NetBeans 7.0 and I am a newbie in NetBeans' world. can any one tell me how to connect my application to MySQl / Postgres ? I work on Windows XP.
To Connect to a MySQL Database 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. In the Basic Setting tab, enter the Database's URL <HOST>:<PORT>/<DB> in the corresponding text field.
In the option pane, click on Properties. Step 4: In properties, go to Libraries and click on the plus '+' tab of the Classpath and choose Add JAR/Folder. Step 5: Browse the folder which we copied to some other location and choose the JAR file present in that folder with name such as mysql-connector-java-8.0.
In the Services window you can right click on the Databases tab and select New Connection.
Select MySQL(Connector/J Driver) from the drop down list. The driver file should be listed in the window. If not, you can download the file, then click add and select it from your hard drive.
Finally enter your database details such as servername, username and password and click finish.
One way to connect to such databases is to use a JDBC (Java Database Connectivity) driver. You can find more about JDBC at the Oracle FAQ.
If you meant you want to use IDE's GUI tool then
Or otherwise use JDBC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With