Converting H2 to MySQL

Discussion in 'Bukkit Help' started by bartbergmans, Aug 25, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    bartbergmans

    Can anyone tell me how to convert a H2 database to MySQL?

    My .bat file has this line:
    Code:
    java -cp h2*.jar org.h2.tools.Script -url jdbc:h2:D:\MineCraft\plugins\iConomy\minecraft -user sa -password sa
    
     
  2. Offline

    Lolmewn

    If you in some way can get all the data from your H2 database, you could make a query for MySQL with the variables in there. I see no easier way.
     
  3. Offline

    bartbergmans

    Isnt there a converter or something?
    At the iConomy wiki they say you can convert it but I can't get it working..
    http://ico.nexua.org/Main/FAQ#toc28

    What am I doing wrong?
    Code:
    java -cp h2*.jar org.h2.tools.Script -url jdbc:h2:D:\MineCraft\plugins\iConomy\minecraft -user sa -password sa
    
    makes an empty SQL file.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  4. Offline

    tha d0ctor

  5. Offline

    bartbergmans

    What database I have to select then? I don't see H2.
     
  6. Offline

    tha d0ctor

    try this instead

    http://iconomy.nexua.org/Main/FAQ#toc28

     
  7. Offline

    bartbergmans

    Like I said:
    Code:
    java -cp h2*.jar org.h2.tools.Script -url jdbc:h2:D:\MineCraft\plugins\iConomy\minecraft -user sa -password sa
    
    gives an empty SQL file.

    Im now trying RazorSQL. What is the JDBC URL?

    I finally connected to the H2 database but everything is empty?

    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  8. Offline

    bartbergmans

    Can someone help me?
     
  9. Offline

    fragger505

    bump
    I'm having the same problem.
     
  10. Offline

    mario713

    bump
    Me too :( pls someone answer
    @EDIT
    ok solved :)
    in lib directory:
    Code:
    java -cp h2*.jar org.h2.tools.Script -url jdbc:h2:path/to/minecraft -user sa -password sa
    ps. your server must be turned off to do this :)
     
  11. Offline

    bartbergmans

    I'm running on a Windows server. What do I have to use then?​
     
  12. Offline

    Mapatti

    Put that into .bat file and run it.
     
  13. Offline

    bartbergmans

    Ok thanks :)
     
  14. Offline

    bartbergmans

    I now have the SQL file. How do I get it to proper MySQL?
     
  15. Offline

    Mapatti

    SQL or MySQL file? If last then you need to Import it. Otherwise convert and import.
     
  16. Offline

    bartbergmans

    How to convert it to MySQL
     
  17. Offline

    Nick22

    i was able to make create backup.sql properly, but how do i import it into MySQL?
     
  18. Offline

    Virauge

    When I use the batch file in this post the backup.sql file has this inside:

    CREATE USER IF NOT EXISTS SA SALT '79af65f441b7e4a6' HASH 'c49cbcab43ba71b9847c7c2ab9d6f758e2a6284bcc0651728002d8da2c5cb0e6' ADMIN;

    It can't be imported in mysql. Why doesn't it convert the database?
     
  19. Offline

    SilentStray

    Please reply ^^
     
  20. Offline

    bartbergmans

    Someone who knows how to do this yet?
     
  21. Offline

    Joannou1

    I really need help getting the .sql file to proper .frm etc files
     
  22. Offline

    SilentStray

    still nothing?.....no one?
     
  23. Offline

    Alien100

    If u use PHPMyAdmin you can import SQL file too. It converts this automatically :)
     
  24. Offline

    kikotte

    how can you do? I try this it work not.
    Code:
    java -cp h2-1.3.167.jar org.h2.tools.Script -url "jdbc:h2:D:\MC server\bajs server.se\server 13\plugins\Jobs\Ny mapp" -user "sa"
     
Thread Status:
Not open for further replies.

Share This Page