funkemunky / AntiVPN

An antivpn utilizing the funkemunky API
Apache License 2.0
21 stars 7 forks source link

Version 1.7 Database Problems #21

Closed Xaver106 closed 2 years ago

Xaver106 commented 2 years ago

Version 1.7 displays an error when starting with a database and doesn't seem to connect to it properly, as it doesn't change anything.

It seems, that the Plugin mixes SQLite with MySql!

It creates two SqLite Databases in a Subfolder KauriVPN/databases, looking at the console output, it probably tries to connect to those and fails as it tries to use it as a MySql Database?! Both of the files can't be opend by the DB Browser (Invalid file format).

Also tested in the 1.6.1 and the Database function worked as intended without an error at startup.

Console Output:

[23:28:38 INFO]: Starting AntiVPN services...
[23:28:38 INFO]: Using databaseType MySQL...
[23:28:38 INFO]: Initializing MySQL...
[23:28:38 INFO]: Connection to SQlLite has been established.
[23:28:38 INFO]: Creating tables...
[23:28:38 INFO]: Creating indexes...
[23:28:38 ERROR]: MySQL Excepton createdTable "STATISTICS" not found; SQL statement:
[23:28:38 ERROR]: SELECT COUNT(1) IndexExists FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema=DATABASE() AND table_name='whitelisted' AND index_name='uuid_1'; [42102-210]
[23:28:38 INFO]: Starting bStats metrics...
[23:28:38 INFO]: Getting strings...
[23:28:38 INFO]: Enabled plugin KauriVPN version 1.7 by funkemunky

Images

image image

funkemunky commented 2 years ago

Actually the reason the database isn't loading in your program is because the AntiVPN plugin does not use SqlLite. We use H2 since it is more feature parody to MySQL than SqlLite is. Try finding software that can open H2 databases.

Xaver106 commented 2 years ago

But the issue with the MySql Database is still there! The Plugin still doesn't connect to the MySql Database! I assumed it is SQLite as it says so in the Console output. Please read the whole Issue Report before closing it!

Xaver106 commented 2 years ago

@funkemunky forgot to ping