Page 264 - IT-802_class_12
P. 264
5 When the server is connected the [disconnected] will removed from the MySQL Server at localhost:3306 [root]
database. You will also be able to expand the MySQL Server node by Clicking on the + sign to view all the available
MySQL databases.
This completes the connection of the MySQL Server to NetBeans.
3.15.2 Adding the MySQL Connector JAR to the NetBeans Libraries
We must first add the mysql connector JAR file to the Libraries in our project before we can write the Java programme
to connect to the database. To do this, follow the steps given below:
1 Right-click on the Libraries node and select ADD JAR/ Folder… under the Projects tab.
2 The Add JAR/Folder dialog box appears. Navigate to the folder where my sql connector is located. Click on
mysql-connector-j-8.0.31.jar. Click on Open.
262 Touchpad Information Technology-XII

