i got error while to connect the database of traccar in AWS using mysql [ Access denied for user 'root'@'localhost' (using password: YES) - CJException]

trupti4 months ago
root@ip-172-31-43-118:/home/ubuntu# sudo tail -f /opt/traccar/logs/tracker-server.log                              sudo tail -f /opt/traccar/logs/tracker-server.log
2024-08-08 11:12:04  INFO: HikariPool-1 - Starting...
2024-08-08 11:12:10 ERROR: Main method error - Access denied for user 'root'@'localhost' (using password: YES) - CJException (... < DatabaseModule:80 < <gener:-1 < *:-1 < ... < MainModule:129 < ...)
2024-08-08 11:12:22  INFO: Operating system name: Linux version: 6.8.0-1012-aws architecture: amd64
2024-08-08 11:12:22  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 21.0.4+7-LTS
2024-08-08 11:12:22  INFO: Memory limit heap: 475mb non-heap: 0mb
2024-08-08 11:12:22  INFO: Character encoding: UTF-8
2024-08-08 11:12:22  INFO: Version: 6.3
2024-08-08 11:12:22  INFO: Starting server...
2024-08-08 11:12:22  INFO: HikariPool-1 - Starting...
2024-08-08 11:12:28 ERROR: Main method error - Access denied for user 'root'@'localhost' (using password: YES) - CJException (... < DatabaseModule:80 < <gener:-1 < *:-1 < ... < MainModule:129 < ...)
^C
root@ip-172-31-43-118:/home/ubuntu# cd /opt/traccar
root@ip-172-31-43-118:/opt/traccar# /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml             /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
2024-08-09 09:18:27 ERROR: Main method error - An XML properties document must contain the DOCTYPE declaration as defined by java.util.Properties. - SAXParseException (... < Config:45 < <gener:-1 < *:-1 < ... < Main:116 < ...)
root@ip-172-31-43-118:/opt/traccar# 

how can i solve this problem ???

Anton Tananaev4 months ago

Provide the correct database credentials.