Hello for everyone,
I was with a trouble to change my database from H2 to MYSQL, i follow the instructions from official documentation of traccar https://www.traccar.org/mysql/
these errors appeared:
WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-02-20 13:20:37 ERROR: HikariPool-1 - Exception during pool initialization. - Public Key Retrieval is not allowed - UnableToConnectException (... < DataManager:139 < *:89 < Context:292 < Main:110 < ...)
2020-02-20 13:20:37 ERROR: Main method error - Public Key Retrieval is not allowed - UnableToConnectException (... < DataManager:139 < *:89 < Context:292 < Main:110 < ...)
2020-02-20 13:20:37 WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@78452606 threw the following exception - Public Key Retrieval is not allowed - UnableToConnectException (... < DataManager:139 < *:89 < Context:292 < Main:110 < ...)
SOLUTION:
In this line
<entry key='database.url'>jdbc:mysql://[HOST]:3306/[DATABASE]?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
Add these parameters on traccar.xml:
allowPublicKeyRetrieval=true
useSSL=false
It will look like this:
<entry key='database.url'>jdbc:mysql://[HOST]:3306/[DATABASE]?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
Hello for everyone,
I was with a trouble to change my database from H2 to MYSQL, i follow the instructions from official documentation of traccar https://www.traccar.org/mysql/
these errors appeared:
SOLUTION:
In this line
<entry key='database.url'>jdbc:mysql://[HOST]:3306/[DATABASE]?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
Add these parameters on traccar.xml:
allowPublicKeyRetrieval=true
useSSL=false
It will look like this:
<entry key='database.url'>jdbc:mysql://[HOST]:3306/[DATABASE]?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>