Use MariaDB JDBC URL for connections.
This commit is contained in:
parent
286697e77e
commit
b75a4227d7
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1200,7 +1200,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jgs");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -2809,7 +2809,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jls");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1207,7 +1207,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jgs");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -2825,7 +2825,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jls");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1215,7 +1215,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jgs");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -2840,7 +2840,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jls");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobius?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1208,7 +1208,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jgs");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -2826,7 +2826,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jls");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -37,8 +37,8 @@ LoginHost = 127.0.0.1
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Login - Mysql's user
|
||||
Login = root
|
||||
|
@ -48,8 +48,8 @@ ShowLicence = True
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusc6?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Parameters Databases - MYSQL
|
||||
# Login - Mysql's user
|
||||
|
@ -1369,7 +1369,7 @@ public final class Config
|
||||
GAME_SERVER_LOGIN_HOST = serverSettings.getProperty("LoginHost", "127.0.0.1");
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getProperty("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getProperty("URL", "jdbc:mysql://localhost/");
|
||||
DATABASE_URL = serverSettings.getProperty("URL", "jdbc:mariadb://localhost/");
|
||||
|
||||
DATABASE_LOGIN = serverSettings.getProperty("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getProperty("Password", "");
|
||||
@ -3822,7 +3822,7 @@ public final class Config
|
||||
EXTERNAL_HOSTNAME = serverSettings.getProperty("ExternalHostname", "localhost");
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getProperty("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getProperty("URL", "jdbc:mysql://localhost/l2jdb");
|
||||
DATABASE_URL = serverSettings.getProperty("URL", "jdbc:mariadb://localhost/l2jdb");
|
||||
DATABASE_LOGIN = serverSettings.getProperty("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getProperty("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = Integer.parseInt(serverSettings.getProperty("MaximumDbConnections", "10"));
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1378,7 +1378,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -3364,7 +3364,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jmobiush5?useUnicode=true&characterEncoding=utf-8");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1151,7 +1151,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jgs");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -2726,7 +2726,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jls");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1155,7 +1155,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jgs");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -2733,7 +2733,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jls");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
@ -41,8 +41,8 @@ GameserverPort = 7777
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -41,8 +41,8 @@ LoginPort = 9014
|
||||
Driver = org.mariadb.jdbc.Driver
|
||||
|
||||
# Database URL
|
||||
# Default: jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mysql://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
# Default: jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
URL = jdbc:mariadb://localhost/l2jmobiusclassic?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||
|
||||
# Database user info (default is "root" but it's not recommended)
|
||||
Login = root
|
||||
|
@ -1155,7 +1155,7 @@ public final class Config
|
||||
ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
|
||||
|
||||
DATABASE_DRIVER = serverSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs");
|
||||
DATABASE_URL = serverSettings.getString("URL", "jdbc:mariadb://localhost/l2jgs");
|
||||
DATABASE_LOGIN = serverSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = serverSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
|
||||
@ -2733,7 +2733,7 @@ public final class Config
|
||||
LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
|
||||
|
||||
DATABASE_DRIVER = ServerSettings.getString("Driver", "org.mariadb.jdbc.Driver");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls");
|
||||
DATABASE_URL = ServerSettings.getString("URL", "jdbc:mariadb://localhost/l2jls");
|
||||
DATABASE_LOGIN = ServerSettings.getString("Login", "root");
|
||||
DATABASE_PASSWORD = ServerSettings.getString("Password", "");
|
||||
DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseBackup
|
||||
final String mysqldumpPath = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? Config.MYSQL_BIN_PATH : "";
|
||||
try
|
||||
{
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mysql://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
final Process process = Runtime.getRuntime().exec(mysqldumpPath + "mysqldump -u " + Config.DATABASE_LOGIN + (Config.DATABASE_PASSWORD.trim().isEmpty() ? "" : " -p" + Config.DATABASE_PASSWORD) + " " + Config.DATABASE_URL.replace("jdbc:mariadb://", "").replaceAll(".*\\/|\\?.*", "") + " -r " + Config.BACKUP_PATH + (Server.serverMode == Server.MODE_GAMESERVER ? "game" : "login") + new SimpleDateFormat("_yyyy_MM_dd_HH_mm'.sql'").format(new Date()));
|
||||
process.waitFor();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -36,7 +36,7 @@ public class MySqlConnect
|
||||
try (Formatter form = new Formatter())
|
||||
{
|
||||
Class.forName("org.mariadb.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
final String formattedText = form.format("jdbc:mysql://%1$s:%2$s", host, port).toString();
|
||||
final String formattedText = form.format("jdbc:mariadb://%1$s:%2$s", host, port).toString();
|
||||
con = DriverManager.getConnection(formattedText, user, password);
|
||||
|
||||
try (Statement s = con.createStatement())
|
||||
|
Loading…
Reference in New Issue
Block a user