Check the new driver before the old one

This commit is contained in:
Unbê Produções
2022-02-05 02:27:02 -03:00
committed by GitHub
parent 46156c4286
commit 23481bd786
@@ -12,7 +12,11 @@ public class MySQL {
public static void init() {
try {
if (conn == null || conn.isClosed()) {
Class.forName("com.mysql.cj.jdbc.Driver");
try {
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException e) {
Class.forName("com.mysql.jdbc.Driver");
}
conn = DriverManager.getConnection("jdbc:mysql://" + AntiVPN.getInstance().getConfig().getIp()
+ ":" + AntiVPN.getInstance().getConfig().getPort()
+ "/?useSSL=true&autoReconnect=true",