Database Management > Summary > How to connect database with netbeans application/ Java Database Connectivity with MySQL (All)
When you are using JDBC outside of an application server, the DriverManager class manages the establishment of connections. Specify to the DriverManager which JDBC drivers to try to make Connection... s with. The easiest way to do this is to use Class.forName() on the class that implements the java.sql.Driver interface. With MySQL Connector/J, the name of this class is com.mysql.cj.jdbc.Driver. With this method, you could use an external configuration file to supply the driver class name and driver parameters to use when connecting to a database. The following section of Java code shows how you might register MySQL Connector/J from the main() method of your application. If testing this code, first read the installation section at Chapter 4, Connector/J Installation, to make sure you have connector installed correctly and the CLASSPATH set up. Also, ensure that MySQL is configured to accept external TCP/IP connections. [Show More]
Last updated: 2 years ago
Preview 1 out of 1 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Sep 09, 2022
Number of pages
1
Written in
This document has been written for:
Uploaded
Sep 09, 2022
Downloads
0
Views
70
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·