Migration H2 to MySQL

Superego6 years ago

Hello, Anton!
I really return to that question again and again - modify H2 database (due to future date bug) or do migration to MySQL (what I handle better)! Did the search here and googled, try to use that, but still didn't come to solution.

  1. So I use H2 Console to view existing Traccar database.mv file. Can connect to it, see tables but can't see any info in it - no rows of data.
    alt text
  2. Used Squirrel. Again - can connect to DB, but can't see anythying in it, nor also convert.
    alt text

Do you have any advice how to migrate to MySQL?

Thanks in advance,
Egons

Superego6 years ago

I fond that in one topic traccar database looks different
Link

alt text

Why I can't see table POSITIONS in my DB?

Anton Tananaev6 years ago

Because you are looking at the wrong schema.

Andrea4 years ago

Hi Anton, maybe 2 more words would have helped him and somebody else (like me)!

Anton Tananaev4 years ago

Your database seems empty.

Andrea4 years ago

Thanks to what you've just answered me, I've realized that in Squirrel-sql when creating the alias the database name must be without extension.
I've used database.mv and Squirrel-sql created an empty database named database.mv.mv
Using just database I now can open it and see all the tables!

P.s. The file name must be in this format: jdbc:h2:PATH_TO_DB\DB_NAME_without_extension

amaghu103 years ago

How do you connect to the remote h2 database?

Most examples show only the connection to local h2 databases. pls help