H2 to mySQL

dodododododx15 days ago

Anyone did list recently?

I am trying since yesterday, but I am unable to open the database in RazorSQL.
Stopped the docker container and took the database.mv.db to my local machine.
RazorSQL only gives:

ERROR: An error occurred while trying to make a connection to the 
database:  

JDBC URL: jdbc:h2:file:C:\Users\admin\Desktop\traccar\database

File corrupted while reading record: null. Possible solution: use 
the recovery tool [90030-199] 

Database is around 7MB.
Server was working fine before the graceful shutdown.

Anton Tananaev15 days ago

Does it still work in Traccar? Maybe you're using wrong driver version?

dodododododx15 days ago

Yes. I rolled back the docker compose and the server runs fine and the data is still there.
In RazorSQL I tried JDBC H2 Embedded 1.x and JDBC H2 Embedded 2.x without luck.
Driver is the preselected C:\Program Files\RazorSQL\drivers\h2\h2.jar

Anton Tananaev15 days ago

You should use the same driver as Traccar.

dodododododx15 days ago

Using the driver from traccar it was still not working.
When using the "browse" button to select a file it is also adding the .db extension - however without the extension it is working (event with the default driver from RazorSQL).
In Database .db file instead of C:\Users\admin\Desktop\database.mv.db use C:\Users\admin\Desktop\database