Convert SQLite database to MySQL [OUTDATED]

  • Outdated information :!: See this topic instead: https://forum.rising-world.net/thread/9762



    Since version 0.5.6 it's possible to use MySQL instead of SQLite (dedicated server only). It's highly recommended to use MySQL when you're running a server with several players.
    If you want to convert your old SQLite Worlds, you can use our small converter tool (we will release a gui version of it soon): https://download.rising-world.net/tools/converter.zip


    Simply extract the zip and execute the jar file with these arguments:
    java -jar converter.jar WORLDPATH IP:PORT USERNAME PASSWORD DATABASE


    For example:
    java -jar converter.jar "C://Rising World/Worlds/New World" 127.0.0.1:3306 root 123456789 newworld


    To enable MySQL for your server, you have to change these settings in your server.properties file:


    database_mysql_connectionstotal number of simultaneous connections
    database_mysql_databasedatabase name
    database_mysql_passworduser password
    database_mysql_useruser name
    database_mysql_server_ipmysql server ip
    database_mysql_server_portmysql server port
    database_typesqlite or mysql, in this case mysql



    Note: Before starting conversion, it's strongly recommended to create a backup of your world! :!:

  • Server-Version: 10.0.17-MariaDB-1~wheezy - mariadb.org binary distribution


    Exception in thread "main" java.lang.UnsupportedClassVersionError: risingworld/worldconverter/RisingWorldWorldConverter : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

    --------------------------
    s3mt3x™ ツ

  • ^^ thats it i have 7 and 8 but this comes on 8.



    0.1:3306 rising_world rising_world rising_world
    java.sql.SQLException: path to '//home/risingworld/server_1/Worlds/MyPlace//home/risingworld/server_1/Worlds/MyPlace.db': '/home/risingworld/server_1/Worlds/MyPlace/home' does not exist
    at org.sqlite.Conn.open(Conn.java:103)
    at org.sqlite.Conn.<init>(Conn.java:57)
    at org.sqlite.JDBC.createConnection(JDBC.java:77)
    at org.sqlite.JDBC.connect(JDBC.java:64)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:270)
    at risingworld.worldconverter.database.SqLiteConnection.connect(SqLiteConnection.java:33)
    at risingworld.worldconverter.SqLitetoMySQL.convertToMySQL(SqLitetoMySQL.java:29)
    at risingworld.worldconverter.RisingWorldWorldConverter.main(RisingWorldWorldConverter.java:12)
    Exception in thread "main" java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:536)
    at java.awt.Frame.<init>(Frame.java:420)
    at java.awt.Frame.<init>(Frame.java:385)
    at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1758)
    at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1833)
    at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1696)
    at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:666)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:637)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:608)
    at risingworld.worldconverter.SqLitetoMySQL.convertToMySQL(SqLitetoMySQL.java:30)
    at risingworld.worldconverter.RisingWorldWorldConverter.main(RisingWorldWorldConverter.java:12)

    --------------------------
    s3mt3x™ ツ

  • /usr/jre1.8.0_40/bin/./java -jar converter.jar "/home/risingworld/server_1/Worlds/MyPlace" 127.0.0.1:3306 xx xx xx

    --------------------------
    s3mt3x™ ツ

  • The requested URL /tools/converter.zip was not found on this server. ???


    The download link slightly changed, did you perhaps use the old link?


    now it works but the tool is not automatical quite if there are finish


    Depending on your worldsize, it may take a while until it's finished. The last output should be "Copied xxx data points from SQLite to MySQL in xx seconds", then the program should quit.

  • red i have changed my post to ... ^^ i see on the database the wold chunk is working. i must tell you slow querys without a index?

    --------------------------
    s3mt3x™ ツ

  • ok guys for who may not know how to do this download the tool unzip it and in the folder make a file with notepad, save it under all types as run.bat, then edit it and copy and paste this line

    Quote

    java -jar converter.jar "C://Rising World/Worlds/New World" 127.0.0.1:3306 root 123456789 newworld

    Next change the details on the line to yours and save. now its just a matter of clicking on the run.bat file and it should be sweet :-) if you dont have mtsql you can install wamp server its free and includes phpmyadmin witch you can use to make and edit the database

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png

    Edited 6 times, last by yahgiggle ().

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!