Mybatis connects to a Mysql database with the following warning.
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.
Solution.
In the Mybatis connection database configuration file, modify the connection driver to.
<dataSource type="POOLED">
<!--change com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver -->
<property name="driver" value="com.mysql.cj.jdbc.Driver"/>
</dataSource>
Read More:
- [Solved] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
- [Solved] error {dataSource-1} init error java.sql.SQLException: com.mysql.cj.jdbc.Driver
- [Solved] init datasource error, url: jdbc:mysql://lcoalhost:3306/test com.mysql.cj.jdbc.exceptions.Com
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- Mybatis Error: The server time zone value ‘����1532a0’ is unrecognized
- [Solved] Druid connection pooling Error: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- How to Solve c3p0 connect mysql8.0 Error
- [Solved] com.mysql.jdbc.MysqlDataTruncation: Data truncation xxxx
- [Solved] Error response from daemon: driver failed programming external connectivity on endpoint mysql
- [Solved] Error response from daemon: driver failed programming external connectivity on endpoint mysql
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- [Solved] C# connecting to MySQL database reports an error
- How to Solve MYSQL Error: Failed to start MySQL 8.0 database server
- MySQL Install Error: MySQL error 1042: Unable to connect to any of the specified MySQL hosts
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘