Thanks for the tip. Once I created the database, I logged in then. I just tried it again to see that it didn't create and tables.
What is the next step you would recommend?
[root@chi ~]# mysql -uroot -ppassword traccar Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 Server version: 5.5.52-MariaDB MariaDB Server Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [traccar]> show tables ; Empty set (0.00 sec)
BTW, I just downloaded and the bin file for traccar is now a little different:
the directory doesn't contact a startDaemon.sh. It now contains:
/opt/traccar/bin/traccar
/opt/traccar/bin/wrapper
but no startDaemon.sh.
follow simple steps
it will create tables and dump data automatically
I have done this 3 times now. Each time I had to modify the /opt/traccar/conf/traccar.xml adding this information to use mysql:
<entry key='database.driver'>com.mysql.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://localhost:3306/traccar?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry> <entry key='database.user'>root</entry> <entry key='database.password'>password</entry>
It still doesn't create the tables in the database traccar.
I have to be missing something but I don't know what it is.
I am able to log in using the above credentials to the database, of course there is no tables to see, is the modified .xml file correct as I have pasted?
I tried it again NOT modifying the traccar.xml file to use mysql and traccar started.
The issue I believe is with the modifications I made to the traccar.xml file to use mysql. I want to use mysql. I copy and pasted the section as the documentation says to do but it is not working creating the mysql tables or allowing traccar to start.
Can anyone tell me what is wrong with the modified file so that I can run traccar using mysql?
<entry key=’database.driver’>com.mysql.jdbc.Driver</entry> <entry key=’database.url’>jdbc:mysql://localhost:3306/traccar?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=”</entry> <entry key=’database.user’>root</entry> <entry key=’database.password’>password</entry>
@steve, why are using old version of Traccar? I would recommend getting the latest one.
I didn't know that I was. I got it from github.
Thank you, I will look for the latest one and install.
Thanks very much for your help.
I am looking forward to using Traccar.
Steve
Even on GitHub the latest version is always on the top:
I have version 3.10 now installed. I want to use MySQL. I assume the instructions:
"By default Traccar Server uses embedded H2 database. If you want to use MySQL database engine you need to replace following lines in configuration file:" means /opt/traccar/config/traccar.xml?
I want to make sure I cam doing this correct.
Yes, correct.
It was obviously right. Thanks for your help. This is an awesome program. I have it installed using MySQL. It built the tables and installed as expected once I had the latest version install.
Awesome!
Thanks again.
I have no idea how I got that old version, thanks for pointing that out. I appreciate it.
I modified the traccar.xml file to reflect I am using mariadb/mysql database
/opt/traccar/conf/traccar.xml
logs:
Java was installed right after MySQL was done.
The script was run to install traccar but there are no tables in MySQL and traccar will start then fail.
Any help would be appreciated.