After rebooting traccar still works, but it seems to still be writting data to the H2 database, with no communication to MySQL...
Here is what my traccar config file looks like if this helps. I am still stuck. Do I have the ANSI code in an ok spot?
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
SET GLOBAL SQL_MODE=ANSI_QUOTES;
<properties>
...
No. You need to set mode to ANSI_QUOTES in MySQL config file (if you want it permanent) or via MySQL client (for current session only). It's part of MySQL config, not Traccar.
Thank you. I have updated the my.ini file to reflect as follows below; however, when I go to XXX.XXX.XXX.XXX:8082 it won't load traccar and communicate with the MySQL database, it seems to work fine with the H2 database though. Any suggestions?
# The MySQL server
[mysqld]
SET GLOBAL SQL_MODE=ANSI_QUOTES;
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"
If you put it into the MySQL config file, you need to use following syntax:
sql-mode="ANSI_QUOTES"
Thank you man! It works now!
Hi RickOShay can you help me? I'm trying to septup traccar with mysql and xampp, but i'm stuck at the beginning.
@sedoc001, why do you want to use XAMPP? Only for MySQL?
Hi,
Can you be more specific? What are you stuck on?
How to know H2 database in Traccar using command line in Linux ?
I've tried but it doesn't work
Thank you
Do you mean that you want to connect from command line to the database?
I don't know if there is any command line client available. Also, even if you find one, you would have to stop Traccar service stop because H2 doesn't allow connection from two different processes simultaneously.
So how to know H2 database in Traccar ?
How to get it ?
JDBC URL to the database is in the config file.
How to know it if I use Linux Server ?
Hello,
I am using the MySQL within XAMPP. I have configured traccar to work and it functions just fine using the H2 database. I have followed the instructions on changing modifiying the code to work with MySQL (https://www.traccar.org/mysql/); however, I cannot get the the program to communicate with the MySQL Database.
After I changed the code I rebooted and checked the traccar log file. I can see traccar shutdown and then try to comeback online, but from there, no more data is logged:
Can anyone give me some ideas? Anyone work to traccar and xampp together?
Thanks