Traccar not connecting to MySQL Database

Richard Ofoezie6 years ago

I have tried changing Traccar default database to MySQL, using the below settings, as recommended. I created a database called "traccar". Traccar works fine with the default H2 database, but, issues an error message that reads "ERR_CONNECTION_REFUSED" when the below settings was used.

<entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entrykey='database.url'>jdbc:mysql://localhost:3306/traccar?useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;
useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.user'>root</entry> 
<entry key='database.password'>123456789</entry>

Here is what the tracker-server.log file looks like:

2017-11-17	16:45:59	INFO: [B216AD5E]	disconnected
2017-11-17	16:45:59	INFO: [89800668]	disconnected
2017-11-17	16:45:59	INFO: [A9F996A9]	disconnected
2017-11-17	16:45:59	INFO: [09699638]	disconnected
2017-11-17	16:45:59	INFO: [97CE9899]	disconnected
2017-11-17	16:45:59	INFO: [19BFC6E7]	disconnected
2017-11-17	16:45:59	INFO: [7B8674DD]	disconnected

Kindly, advice on how to resolve this issue.

Anton Tananaev6 years ago

You are looking at the wrong log file. You have to check wrapper log for errors. And please search for the solution before posting it here.

jovi6 years ago

@Richard Ofoezie, you must install from 0 before executing / opt / traccar / bin / startDaemon. sh you must configure mysql