Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 6 of 6
  1. #1
    Join Date
    January 2010
    Location
    Germany
    Posts
    88

    Server transfer to mySQL

    Hey,
    how can i change the Database of my Server to use the mySQL database? Without creating everything new.
    Thanks
    michi119

  2. #2
    Join Date
    December 2009
    Location
    Portugal
    Posts
    492
    Hi

    I've already managed to get this working, so i'll explain how i did it in short:

    - Export your sqlitedb file to a *.sql using an sqlite manager (like the extension for firefox);
    - Open the *.sql file with an advanced text editor (like notepad++ or gedit) and REMOVE ALL the quotation marks ("), ALL the "DROP" and "CREATE" lines and the LAST LINES of the file that contain *sqlite*;
    - Create a table in MySQL with the desired name;
    - Start the server using the MySQL plugin and all the settings;
    - Stop the server and then TRUNCATE all the tables in the TS3 database using "truncate <tablename>" (i did that one by one);
    - Import the *.sql file into the database;
    - And finally start the server...

    I am a rookie in SQL, and all i did was due to lots of fails and some googling, but i managed to do it.

    Also, if you are wondering why didn't i removed the tables also and create them when importing the *.sql file, i can't explain why. All i know is that i had to, or it wouldn't work.

    Optionally, according to this user, you could replace all the "INSERT INTO" lines by "REPLACE INTO" therefore ignoring the step where you have to truncate the tables, but i haven't tested this.

    Regards

  3. #3
    Join Date
    January 2010
    Location
    germany
    Posts
    9

    Arrow

    i followed this guide:
    1. run: sqlite3 ts3server.sqlitedb .dump >> ts3dump.sql
    2. in the dumped file replace all " with '
    3. delete all lines which contain: begin transaction, commit, sqlite
    4. replace autoincrement with auto_increment
    5. import the file with phpmyadmin or similar


    thats it.
    worked for my DB with 3 servers, about 50 channels and 300 users

    some channel names or descriptions with " will now contain ' of course, change it back to " once the migration is complete

  4. #4
    Join Date
    January 2010
    Location
    Germany
    Posts
    88
    the 1st guide occured in an error
    2. guide where to enter the "sqlite3 bla"?

  5. #5
    Join Date
    December 2009
    Location
    Portugal
    Posts
    492
    That would be in linux terminal, but you should get the same result by exporting the file with an sqlite manager.

    Which error did you got by the way?

  6. #6
    Join Date
    January 2010
    Location
    germany
    Posts
    9
    yes linux terminal, or it actually might work for windows too perhaps.. in any case you may have to dl the sqlite3 program from their website

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 11
    Last Post: May 5th, 2014, 03:02 PM
  2. [Resolved] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
    By Svenskunganka in forum Server Support
    Replies: 2
    Last Post: September 12th, 2013, 10:59 PM
  3. Replies: 1
    Last Post: November 27th, 2012, 10:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •