Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Navicat or SQL problem

Newbie Spellweaver
Joined
Jul 25, 2018
Messages
13
Reaction score
2
So when I drop my al_server_ls in my navi cat this error code pops up. Sorry in advance for this throw up wall of text. But the 2 erros are as follows.
1.) [ERR] 1067 - Invalid default value for 'time'

2.) [ERR] SET FOREIGN_KEY_CHECKS=0;

This is the entire error log down below.

AL-Login SQL file to navicat error code. [SQL] Query al_server_ls start [ERR] 1067 - Invalid default value for 'time' [ERR] SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for account_data -- ---------------------------- DROP TABLE IF EXISTS `account_data`; CREATE TABLE `account_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) NOT NULL, `password` varchar(65) NOT NULL, `activated` tinyint(1) NOT NULL DEFAULT '1', `access_level` tinyint(3) NOT NULL DEFAULT '0', `membership` tinyint(3) NOT NULL DEFAULT '0', `old_membership` tinyint(3) NOT NULL DEFAULT '0', `last_server` tinyint(3) NOT NULL DEFAULT '-1', `last_ip` varchar(20) DEFAULT NULL, `last_mac` varchar(20) NOT NULL DEFAULT 'xx-xx-xx-xx-xx-xx', `ip_force` varchar(20) DEFAULT NULL, `expire` date DEFAULT NULL, `toll` bigint(13) NOT NULL DEFAULT '0', `email` varchar(50) DEFAULT NULL, `question` varchar(50) DEFAULT NULL, `answer` varchar(50) DEFAULT NULL, `balance` float DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_data -- ---------------------------- -- ---------------------------- -- Table structure for account_playtime -- ---------------------------- DROP TABLE IF EXISTS `account_playtime`; CREATE TABLE `account_playtime` ( `account_id` int(10) unsigned NOT NULL, `accumulated_online` int(10) unsigned NOT NULL DEFAULT '0', `lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`account_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_playtime -- ---------------------------- -- ---------------------------- -- Table structure for account_rewards -- ---------------------------- DROP TABLE IF EXISTS `account_rewards`; CREATE TABLE `account_rewards` ( `uniqId` int(11) NOT NULL AUTO_INCREMENT, `accountId` int(11) NOT NULL, `added` varchar(70) NOT NULL DEFAULT '', `points` decimal(20,0) NOT NULL DEFAULT '0', `received` varchar(70) NOT NULL DEFAULT '0', `rewarded` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`uniqId`), KEY `FK_account_rewards` (`accountId`), CONSTRAINT `FK_account_rewards` FOREIGN KEY (`accountId`) REFERENCES `account_data` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_rewards -- ---------------------------- -- ---------------------------- -- Table structure for account_time -- ---------------------------- DROP TABLE IF EXISTS `account_time`; CREATE TABLE `account_time` ( `account_id` int(11) NOT NULL, `last_active` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `expiration_time` timestamp NULL DEFAULT NULL, `session_duration` int(10) DEFAULT '0', `accumulated_online` int(10) DEFAULT '0', `accumulated_rest` int(10) DEFAULT '0', `penalty_end` timestamp NULL DEFAULT NULL, PRIMARY KEY (`account_id`), CONSTRAINT `FK_account_time` FOREIGN KEY (`account_id`) REFERENCES `account_data` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_time -- ---------------------------- -- ---------------------------- -- Table structure for banned_ip -- ---------------------------- DROP TABLE IF EXISTS `banned_ip`; CREATE TABLE `banned_ip` ( `id` int(11) NOT NULL AUTO_INCREMENT, `mask` varchar(45) NOT NULL, `time_end` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `mask` (`mask`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of banned_ip -- ---------------------------- -- ---------------------------- -- Table structure for banned_mac -- ---------------------------- DROP TABLE IF EXISTS `banned_mac`; CREATE TABLE `banned_mac` ( `uniId` int(10) NOT NULL AUTO_INCREMENT, `address` varchar(20) NOT NULL, `time` timestamp NOT NULL DEFAULT '0000-00-00 ' ON UPDATE CURRENT_TIMESTAMP, `details` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`uniId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Rec [SQL] Finished with error
 
Master Summoner
Joined
May 25, 2020
Messages
537
Reaction score
240
So when I drop my al_server_ls in my navi cat this error code pops up. Sorry in advance for this throw up wall of text. But the 2 erros are as follows.
1.) [ERR] 1067 - Invalid default value for 'time'

2.) [ERR] SET FOREIGN_KEY_CHECKS=0;

This is the entire error log down below.

AL-Login SQL file to navicat error code. [SQL] Query al_server_ls start [ERR] 1067 - Invalid default value for 'time' [ERR] SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for account_data -- ---------------------------- DROP TABLE IF EXISTS `account_data`; CREATE TABLE `account_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) NOT NULL, `password` varchar(65) NOT NULL, `activated` tinyint(1) NOT NULL DEFAULT '1', `access_level` tinyint(3) NOT NULL DEFAULT '0', `membership` tinyint(3) NOT NULL DEFAULT '0', `old_membership` tinyint(3) NOT NULL DEFAULT '0', `last_server` tinyint(3) NOT NULL DEFAULT '-1', `last_ip` varchar(20) DEFAULT NULL, `last_mac` varchar(20) NOT NULL DEFAULT 'xx-xx-xx-xx-xx-xx', `ip_force` varchar(20) DEFAULT NULL, `expire` date DEFAULT NULL, `toll` bigint(13) NOT NULL DEFAULT '0', `email` varchar(50) DEFAULT NULL, `question` varchar(50) DEFAULT NULL, `answer` varchar(50) DEFAULT NULL, `balance` float DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_data -- ---------------------------- -- ---------------------------- -- Table structure for account_playtime -- ---------------------------- DROP TABLE IF EXISTS `account_playtime`; CREATE TABLE `account_playtime` ( `account_id` int(10) unsigned NOT NULL, `accumulated_online` int(10) unsigned NOT NULL DEFAULT '0', `lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`account_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_playtime -- ---------------------------- -- ---------------------------- -- Table structure for account_rewards -- ---------------------------- DROP TABLE IF EXISTS `account_rewards`; CREATE TABLE `account_rewards` ( `uniqId` int(11) NOT NULL AUTO_INCREMENT, `accountId` int(11) NOT NULL, `added` varchar(70) NOT NULL DEFAULT '', `points` decimal(20,0) NOT NULL DEFAULT '0', `received` varchar(70) NOT NULL DEFAULT '0', `rewarded` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`uniqId`), KEY `FK_account_rewards` (`accountId`), CONSTRAINT `FK_account_rewards` FOREIGN KEY (`accountId`) REFERENCES `account_data` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_rewards -- ---------------------------- -- ---------------------------- -- Table structure for account_time -- ---------------------------- DROP TABLE IF EXISTS `account_time`; CREATE TABLE `account_time` ( `account_id` int(11) NOT NULL, `last_active` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `expiration_time` timestamp NULL DEFAULT NULL, `session_duration` int(10) DEFAULT '0', `accumulated_online` int(10) DEFAULT '0', `accumulated_rest` int(10) DEFAULT '0', `penalty_end` timestamp NULL DEFAULT NULL, PRIMARY KEY (`account_id`), CONSTRAINT `FK_account_time` FOREIGN KEY (`account_id`) REFERENCES `account_data` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account_time -- ---------------------------- -- ---------------------------- -- Table structure for banned_ip -- ---------------------------- DROP TABLE IF EXISTS `banned_ip`; CREATE TABLE `banned_ip` ( `id` int(11) NOT NULL AUTO_INCREMENT, `mask` varchar(45) NOT NULL, `time_end` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `mask` (`mask`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of banned_ip -- ---------------------------- -- ---------------------------- -- Table structure for banned_mac -- ---------------------------- DROP TABLE IF EXISTS `banned_mac`; CREATE TABLE `banned_mac` ( `uniId` int(10) NOT NULL AUTO_INCREMENT, `address` varchar(20) NOT NULL, `time` timestamp NOT NULL DEFAULT '0000-00-00 ' ON UPDATE CURRENT_TIMESTAMP, `details` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`uniId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Rec [SQL] Finished with error
open database script and add that before.
SET sql_mode = '';
Save and drop again.

 
Upvote 0
Experienced Elementalist
Joined
Aug 6, 2021
Messages
220
Reaction score
55
banned_mac table sql is:

SQL:
timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

and it should be
SQL:
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP


You shouldn't be getting that second error, try re-create the schema and execute the sql script for each server.
 
Upvote 0
Newbie Spellweaver
Joined
Jul 25, 2018
Messages
13
Reaction score
2
banned_mac table sql is:

SQL:
timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

and it should be
SQL:
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP


You shouldn't be getting that second error, try re-create the schema and execute the sql script for each server.

OMG Thank you soo much and also my startchat is working perfectly fine but my login server shows this error. Sorry in advance for again throw up wall of text.

Starting Aion Lightning Login Server in PRODUCTION mode.
19:15:56.792 INFO [main]: - Using default implementation for ThreadExecutor
19:15:56.808 INFO [main]: - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
19:15:56.809 INFO [main]: - Quartz Scheduler v.2.1.7 created.
19:15:56.810 INFO [main]: - RAMJobStore initialized.
19:15:56.811 INFO [main]: - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'QuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

19:15:56.812 INFO [main]: - Quartz scheduler 'QuartzScheduler' initialized from an externally provided properties instance.
19:15:56.812 INFO [main]: - Quartz scheduler version: 2.1.7
19:15:56.812 INFO [main]: - Scheduler QuartzScheduler_$_NON_CLUSTERED started.
19:15:56.812 INFO [main]: -
2023-04-06 19-15-56

19:15:56.813 INFO [main]: - Loading: myls.properties
19:15:56.813 INFO [main]: - No override properties found
19:15:56.825 INFO [main]: - Loading: ./config/network/network.properties
19:15:56.835 INFO [main]: - Loading: ./config/network/svstats.properties
19:15:56.836 INFO [main]: - Loading: ./config/network/commons.properties
19:15:56.836 INFO [main]: - Loading: ./config/network/database.properties
Exception in thread "main" java.lang.Error: DatabaseFactory not initialized!
at com.aionemu.commons.database.DatabaseFactory.init(DatabaseFactory.java:107)
at com.aionemu.loginserver.LoginServer.main(LoginServer.java:121)
Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://localhost:3306/aion4.9?useUnicode=true&characterEncoding=UTF-8, username = root. Terminating connection pool. Original Exception: ------
java.sql.SQLException: Unexpected exception encountered during query.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1557)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3868)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3407)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2384)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:256)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:305)
at com.aionemu.commons.database.DatabaseFactory.init(DatabaseFactory.java:104)
at com.aionemu.loginserver.LoginServer.main(LoginServer.java:121)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 255
at com.mysql.jdbc.ConnectionImpl.getServerCharacterEncoding(ConnectionImpl.java:3100)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
... 21 more
------

at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:312)
at com.aionemu.commons.database.DatabaseFactory.init(DatabaseFactory.java:104)
... 1 more
Caused by: java.sql.SQLException: Unexpected exception encountered during query.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1557)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3868)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3407)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2384)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:256)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:305)
... 2 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 255
at com.mysql.jdbc.ConnectionImpl.getServerCharacterEncoding(ConnectionImpl.java:3100)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
... 21 more
 
Upvote 0
Experienced Elementalist
Joined
Aug 6, 2021
Messages
220
Reaction score
55
OMG Thank you soo much and also my startchat is working perfectly fine but my login server shows this error. Sorry in advance for again throw up wall of text.

Starting Aion Lightning Login Server in PRODUCTION mode.
19:15:56.792 INFO [main]: - Using default implementation for ThreadExecutor
19:15:56.808 INFO [main]: - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
19:15:56.809 INFO [main]: - Quartz Scheduler v.2.1.7 created.
19:15:56.810 INFO [main]: - RAMJobStore initialized.
19:15:56.811 INFO [main]: - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'QuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

19:15:56.812 INFO [main]: - Quartz scheduler 'QuartzScheduler' initialized from an externally provided properties instance.
19:15:56.812 INFO [main]: - Quartz scheduler version: 2.1.7
19:15:56.812 INFO [main]: - Scheduler QuartzScheduler_$_NON_CLUSTERED started.
19:15:56.812 INFO [main]: -
2023-04-06 19-15-56

19:15:56.813 INFO [main]: - Loading: myls.properties
19:15:56.813 INFO [main]: - No override properties found
19:15:56.825 INFO [main]: - Loading: ./config/network/network.properties
19:15:56.835 INFO [main]: - Loading: ./config/network/svstats.properties
19:15:56.836 INFO [main]: - Loading: ./config/network/commons.properties
19:15:56.836 INFO [main]: - Loading: ./config/network/database.properties
Exception in thread "main" java.lang.Error: DatabaseFactory not initialized!
at com.aionemu.commons.database.DatabaseFactory.init(DatabaseFactory.java:107)
at com.aionemu.loginserver.LoginServer.main(LoginServer.java:121)
Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://localhost:3306/aion4.9?useUnicode=true&characterEncoding=UTF-8, username = root. Terminating connection pool. Original Exception: ------
java.sql.SQLException: Unexpected exception encountered during query.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1557)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3868)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3407)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2384)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:256)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:305)
at com.aionemu.commons.database.DatabaseFactory.init(DatabaseFactory.java:104)
at com.aionemu.loginserver.LoginServer.main(LoginServer.java:121)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 255
at com.mysql.jdbc.ConnectionImpl.getServerCharacterEncoding(ConnectionImpl.java:3100)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
... 21 more
------

at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:312)
at com.aionemu.commons.database.DatabaseFactory.init(DatabaseFactory.java:104)
... 1 more
Caused by: java.sql.SQLException: Unexpected exception encountered during query.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1557)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3868)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3407)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2384)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:256)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:305)
... 2 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 255
at com.mysql.jdbc.ConnectionImpl.getServerCharacterEncoding(ConnectionImpl.java:3100)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
... 21 more

This is the error:

SQL:
Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://localhost:3306/aion4.9?useUnicode=true&characterEncoding=UTF-8, username = root.

Could be incorrect database credentials, make sure the credentials are correct and the user has the ability to access the database.
I recommend you create an entirely new user and never use the root user. It's not good security practice. check my linux server tutorial, I explain how to create a new account and give them access.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 4, 2023
Messages
40
Reaction score
19
I don't use Navicat. DBeaver (which is free, reliable, and is in the Microsoft store) is serving me perfectly. Try using DBeaver!
 
Upvote 0
Experienced Elementalist
Joined
Aug 6, 2021
Messages
220
Reaction score
55
I don't use Navicat. DBeaver (which is free, reliable, and is in the Microsoft store) is serving me perfectly. Try using DBeaver!
Mysql server 5 and Mysql workbench are both free for the community edition and is what I run on my development environment.

The only time I've ever used dbeaver was years ago on linux when I didn't easily have access to mysql workbench.
 
Upvote 0
Back
Top