Mariadb Connection

leo lee6 years ago

Hello..

I want to use mariadb instead of H2.

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

But, I have some problems at ubuntu OS.

I can't connect traccar server using web.

Environment :

  • OS : ubuntu 16.04 (at AWS)
  • Mariadb 10.2.14

So I did as below:

  1. Install mariadb

  2. Create DB : trac (for traacar server)
    user : root
    pw : null

  3. Add dependency at "pom.xml"

        <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
            <version>2.1.2</version>
        </dependency>
  1. Using the new configuration on "debug.xml" and "traccar.xlm"
    <entry key='database.driver'>org.mariadb.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/trac?useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode='' </entry>
    <entry key='database.user'>root</entry>
    <entry key='database.password'></entry>
  1. Build & Start
    Reference : https://www.traccar.org/forums/topic/build-traccar-from-source-via-command-line-method-on-ubuntu-server-16-10/

  2. Try to connect by usint Web Browser.

What's problem?

I ask for your advice.

Anton Tananaev6 years ago

I believe that you can use MySQL driver:

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