Hello guys, I'm trying to figure this one. When I change traccar.xml to connect to mysql database traccar container keeps restarting and it shows nothing in docker logs. Everything is smooth with default database. Please let me know if you see something odd here
My traccar.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://db:3306/traccar?zeroDateTimeBehavior=round&serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>u_traccdb</entry>
<entry key='database.password'>AxVFb9hpCRGqmek</entry>
</properties>
Mysql run command:
docker run -d --name db --hostname db \
-v /home/test/traccar/db:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=uh4RD3rLgpAHa9x \
-e MYSQL_DATABASE=traccar \
-e MYSQL_USER=u_traccdb \
-e MYSQL_PASSWORD=AxVFb9hpCRGqmek \
--restart always library/mysql
It's local testing don't worry about pass
Resolved by creating bridge network
Hello guys, I'm trying to figure this one. When I change traccar.xml to connect to mysql database traccar container keeps restarting and it shows nothing in docker logs. Everything is smooth with default database. Please let me know if you see something odd here
My traccar.xml:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'> <properties> <!-- Documentation: https://www.traccar.org/configuration-file/ --> <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://db:3306/traccar?zeroDateTimeBehavior=round&serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry> <entry key='database.user'>u_traccdb</entry> <entry key='database.password'>AxVFb9hpCRGqmek</entry> </properties>
Mysql run command:
It's local testing don't worry about pass