Database Connectivity - Netbeans
Database Connectivity - Netbeans
EmpId INTEGER
Name VARCHAR(100)
ContactNo VARCHAR(10)
• Download the MySQL Connector/J JAR file from the MySQL website. https://dev.mysql.com/downloads/connector/j/
• Create a project in NetBeans IDE.
• Right click on the project’s libraries, go to Add JAR/Folder.
• Add MySQL Connector/J JAR file to the libraries.
• Expand Databases. Right click on Driver. Select New Driver. Then add the MySQL Connector/J JAR file to the drivers using Add button.
• Then add the database connection to Services in IDE.
• Go to the Services tab, then right click on the Databases. Select New Connection.
• Select (MySQL Connector/J driver).
• Click Next.
• Fill Password field. Click Test Connection.
• If the database is connected, you will get the following result.