Loading class `com.mysql.jdbc.Driver'. This is deprecated.
The new driver class is `com.mysql.cj.jdbc.Driver'.
The driver is automatically registered via the SPI and manual
loading of the driver class is generally unnecessary.
If you are working on a JDBC project with Java and MySQL and you get the above warning message in your console is because the DriverManager connection string that you are using to register MySQL has changed and you should be using com.mysql.cj.jdbc.Driver instead of com.mysql.jdbc.Driver

Replace,
com.mysql.jdbc.Driver
with,
com.mysql.cj.jdbc.Driver
Example:Class.forName("com.mysql.jdbc.Driver");
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!