At line 1 added 3 lines |
__IMPORTANT: due to the security updates since CrushFTP version 10.5.2+ any JDBC driver jar file needs to be placed into the CrushFTP10/plugins/lib/ directory, or it won't load.__ |
\\ |
\\ |
At line 2 removed 2 lines |
|
[https://dev.mysql.com/downloads/connector/j/5.1.html] |
At line 5 changed one line |
Direct link: [https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.47.zip] |
[https://dev.mysql.com/downloads/connector/j/] |
At line 7 changed 2 lines |
Alternatively, can browse the Maven repository for the appropriate JDBC drive matching your SQL server version, if not using the latest build of it |
[https://mvnrepository.com/artifact/mysql/mysql-connector-java] |
Choose the 'platform independent' type download, and extract the archive. There will be a jar file inside that extracted folder. |
At line 10 changed one line |
I suggest placing the mysql-connector-java-5.0.8-bin.jar file from this in the plugins/lib folder of CrushFTP and giving it the name "mysql.jar". |
I suggest placing the mysql-connector-java-8.0.28.jar file from this in the plugins/lib folder of CrushFTP and giving it the name "mysql.jar". |
At line 18 changed one line |
stats_db_driver: com.mysql.jdbc.Driver |
stats_db_driver: com.mysql.cj.jdbc.Driver |
At line 40 changed one line |
1. On prefs.XML (find it at CrushFTP install folder) change the tag value "stat_auto_increment" to true.\\ |
1. On prefs.XML (find it at CrushFTP install folder) change the tag value "__stat_auto_increment__" to __true__.\\ |
At line 42 changed one line |
2. Change the RID column (on META_INFO, SESSIONS and TRANSFERS table) to be auto incremented. Change the data type from DOUBLE ti BIGINT.\\ |
2. Change the RID column (on META_INFO, SESSIONS and TRANSFERS table) to be auto incremented and data type from DOUBLE to BIGINT.\\ |
At line 45 added 6 lines |
ALTER TABLE `META_INFO` CHANGE COLUMN `RID` `RID` BIGINT(20) NOT NULL AUTO_INCREMENT; |
|
ALTER TABLE `SESSIONS` CHANGE COLUMN `RID` `RID` BIGINT(20) NOT NULL AUTO_INCREMENT; |
|
ALTER TABLE `TRANSFERS` CHANGE COLUMN `RID` `RID` BIGINT(20) NOT NULL AUTO_INCREMENT; |
}}}\\ |
At line 46 changed one line |
ALTER TABLE `TRANSFERS` CHANGE COLUMN `RID` `RID` BIGINT(20) NOT NULL AUTO_INCREMENT;\\ |
3. Adjust insert queries. Remove the __RID__ value from all insert query.\\ |
\\ |
[attachments|insert_methods.png]\\ |
\\ |
Change __stats_insert_meta_info__ from:\\ |
{{{ |
INSERT INTO META_INFO (RID, SESSION_RID, TRANSFER_RID, ITEM_KEY, ITEM_VALUE) VALUES (?,?,?,?,?) |
At line 48 changed 2 lines |
|
|
to:\\ |
{{{ |
INSERT INTO META_INFO (SESSION_RID, TRANSFER_RID, ITEM_KEY, ITEM_VALUE) VALUES (?,?,?,?) |
}}}\\ |
\\ |
__stats_insert_sessions__ from:\\ |
{{{ |
INSERT INTO SESSIONS (RID, SESSION, SERVER_GROUP, USER_NAME, START_TIME, END_TIME, SUCCESS_LOGIN, IP) VALUES (?,?,?,?,?,?,?,?) |
}}}\\ |
to:\\ |
{{{ |
INSERT INTO SESSIONS (SESSION, SERVER_GROUP, USER_NAME, START_TIME, END_TIME, SUCCESS_LOGIN, IP) VALUES (?,?,?,?,?,?,?) |
}}}\\ |
\\ |
__stats_insert_transfers__ from:\\ |
{{{ |
INSERT INTO TRANSFERS (RID, SESSION_RID, START_TIME, DIRECTION, PATH, FILE_NAME, URL, SPEED, TRANSFER_SIZE, IGNORE_SIZE) VALUES (?,?,?,?,?,?,?,?,?,'N') |
}}}\\ |
to:\\ |
{{{ |
INSERT INTO TRANSFERS (SESSION_RID, START_TIME, DIRECTION, PATH, FILE_NAME, URL, SPEED, TRANSFER_SIZE, IGNORE_SIZE) VALUES (?,?,?,?,?,?,?,?,'N') |
}}}\\ |