Migration H2 to MySQL

Superego 7 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

Superego 7 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 Tananaev 7 years ago

Because you are looking at the wrong schema.

Andrea 5 years ago

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

Anton Tananaev 5 years ago

Your database seems empty.

Andrea 5 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

amaghu10 4 years ago

How do you connect to the remote h2 database?

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