Access BD Traccar Linux 14.04

afontolan8 years ago

Good evening,
How do I access the DB Traccar? I installed the latest version on Linux 14.04. And wanted to access the database, so I can generate some reports. Thank you

Anton Tananaev8 years ago

What database are you using? Default H2?

afontolan8 years ago

I use the same as the Linux traccar.run install, I do not know how to change the type of database. Can you help me. Thank you

Anton Tananaev8 years ago

By default it uses embedded H2 database. If you want external access, I would recommend to configure MySQL:

https://www.traccar.org/mysql/

afontolan8 years ago

As my traccar is already installed, just replace the lines and create the database in MySQL, or must then run a script? Thank you

Anton Tananaev8 years ago

Just change the config and restart the service. Make sure you created the database first.

afontolan8 years ago

It did not work, I need to remove the [] correct? replace [user] for correct user?
error message "WARNING: traccar may have failed to start."

Anton Tananaev8 years ago

Obviously you need to replace those. Have you read the page?

afontolan8 years ago

Yes, everything I said the old lines not to erase, but it did not work I am using the mysql user root, I created the tracker database, it was so.

    <!--entry key='database.driver'>org.h2.Driver</entry> -->
    <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <!--entry key='database.url'>jdbc:h2:C:\Program Files (x86)\Traccar\data\database</entry> -->
    <entry key='database.url'>jdbc:mysql://localhost:3306/tracker?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES</entry>
    <!--entry key='database.user'>sa</entry> -->
    <entry key='database.user'>root</entry>
    <!--entry key='database.password'></entry> -->
    <entry key='database.password'>***********</entry>
Anton Tananaev8 years ago

Check the error message in wrapper log file. If it's database connection error, it means something is wrong in the config or with MySQL.

afontolan8 years ago

I can not at all, not returning to old code and deleting the Mysql, I had to reinstall to work. Then I'll try again. Thank you so much