- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the MySQL JDBC driver connection string?
152 Lectures 16 hours
87 Lectures 5.5 hours
The MySQL JDBC connection string look like this −
Above, Driver is an interface.
Whenever your JDBC is running outside an application server, then the class DriverManager establish the connection. The DriverManager class is as follows −
conn = (Connection) DriverManager.getConnection("jdbc:mysql://localhost/yourdatabaseName",”yourRootName","yourPassword");
Now, I am applying the above connection string to connect Java to MySQL database. The code is as follows.
The following is the output that shows that MySQL connection with Java is successful.
- What is type1 driver of JDBC what are the advantages and disadvantages of it?
- What is type2 driver of JDBC what are the advantages and disadvantages of it?
- What is type3 driver of JDBC what are the advantages and disadvantages of it?
- What is type4 driver of JDBC what are the advantages and disadvantages of it?
- How to add the JDBC MySQL driver to an Eclipse project?
- Is it mandatory to register the driver while working with JDBC?
- Among all 4 JDBC driver types, when to use which driver?
- What is Selenium Internet Explorer Driver or IE Driver?
- What is the Selenium Web Driver Architecture?
- How to display the storage engine while implementing JDBC - MySQL CONNECTION query?
- What is selenium web driver?
- Where we should close a connection in JDBC and MySQL?
- What is the TCP Connection Establishment?
- How to establish connection with JDBC?
- How to get the properties of a driver using JDBC?