Upgrade from 3.16 to latest version - safe for database?

amo 7 years ago

I switched my server to new and more powerful hardware. On my old one, I had to install traccar manually, which was fine, but I skipped doing updates on version 3.16. I am now setting up my new server and traccar is available as a package for easy updating with system updates. My question is now:
Is it safe for the database (mariadb) if I just install the latest traccar server and give it the database from the 3.16 version? Or is corruption expected in that case?

Another quick question: How do I need to adapt my traccar.xml config for traccar to connect to mariadb with a unix socket? My current config is:

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

Thank you a lot in advance for any advice!

Anton Tananaev 7 years ago

It should be fine, but make sure you backup it first just in case.

amo 7 years ago

Thank you, it indeed worked like a charm!

For who might wonder about the socket issue and maybe arrived here: It looks like the java mysql connector does not support unix sockets at all. Therefore, we have to bind-address=127.0.0.1 in my.cnf