My Traccar server is not work with MySQL

aecsalome8 years ago

Hello all,

I had a Traccar server installed in windows and the web side is working well

I had installed My SQL and create a DATABASE , according ask the site, and change the traccar.xlm.

Using that original traccar.xlm, the web (localhost:8082) works:

    <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>
    <entry key='database.user'>sa</entry>
    <entry key='database.password'></entry>

Using the new configuration on traccar.xlm, I receive message of "ERR_CONNECTION_REFUSED":

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

The MySQL and Traccar services ARE running ! (traccar is DB admin user and salotraccar is DATABASE)
firewall is ok.

and do not have error or warning in wrapper logs:

WARNING|wrapper|Service traccar|17-04-21 18:00:35|YAJSW: yajsw-stable-12.08
WARNING|wrapper|Service traccar|17-04-21 18:00:35|OS   : Windows 10/10.0/amd64
WARNING|wrapper|Service traccar|17-04-21 18:00:35|JVM  : Oracle Corporation/1.8.0_131/C:\Program Files\Java\jre1.8.0_131/64
INFO|wrapper|Service traccar|17-04-21 18:00:35|start delay: 0
INFO|wrapper|Service traccar|17-04-21 18:00:36|started process with pid 3060
INFO|3060/0|Service traccar|17-04-21 18:00:36|[INFO] StandardFileSystemManager - Using "C:\Windows\TEMP\vfs_cache" as temporary files store.
INFO|3060/0|Service traccar|17-04-21 18:00:37|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
INFO|3060/0|Service traccar|17-04-21 18:00:37|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.

What I did wrong?

help me please

Anton Tananaev8 years ago

There must be some problem with database connection. Try to use same database URL in any JDBC client and see if it can connect.

aecsalome8 years ago

Hi Anton,

Sorry, I did not understood: what "database URL" I need to use?

into Mysql, the database created was salotraccar , user traccar

and in line is: jdbc:...salotraccar? ......./entry>

best regards

Anton Tananaev8 years ago

Not sure what's not clear exactly. You have parameter called "database.url". Try it in any JDBC viewer to check connection.

aecsalome8 years ago

Hi,

I try search for all sites to test jdbc and all test give the same "conenction refused"

Could you hep me. I really do not know what I need to do.

BEst regards

Anton Tananaev8 years ago

I guess it means that your MySQL is not configured properly or the connection parameters are wrong.

aecsalome8 years ago

HI again,

Thank you for feedback.

So, I tested MySql using the MySql Workbench tool, and show me it is all ok, no error:

MySql Succefful

I also got the command JDBC directly on Taccar site: https://www.traccar.org/mysql/

But I did not know why works. The logs did not show error, but the cattar web do not works, only using the original taccar.xlm

What I can do?

Anton Tananaev8 years ago

It seems like you keep ignoring my comments. MySql Workbench is NOT a JDBC tool.

aecsalome8 years ago

Hi Anton

I did not ignoring your comments. I do not works with SQL or MySql, it is a "blank new world" for me.
In another words, I do not know the "JDBC tools" avaliables. I am searching and researching myself.

I remove Taccar, delete directory , reboot the server and reinstall taccar server., using the same taccar.xlm that before. I notice that in mysql the tables was created. but in the log appear some errors:

(...)INFO|712/0|Service traccar|17-04-21 22:30:30|INFO 4/21/17 10:30 PM: liquibase: Waiting for changelog lock....(...)

I read that in another poster your, you recommend (...) You need to manually remove the lock from the database table.(...).

Please, how I do that? Note: I am not know SQL world, so once time, I only want your help,and belive, I do not ignoring your comments, only this give me a direction to move forward...

Thank again

Anton Tananaev8 years ago

I told you twice to use JDBC viewer and instead of saying that you don't know what I'm talking about you said something completely unrelated. I think it's pretty much the definition of "ignoring".

You can try SQuirreL SQL tool. That's a JDBC viewer.