PDA

View Full Version : Exporting SQLite do MySQL


Rivotti
10-03-2004, 22:04
Hi all,

With the new server version, I ha the need to export the old SQLite db to a new one using MySQL. I've searched a bit and found a way to do it. For those who wanto to know how to do it, here's a small tutorial.

I'm using Linux so, my examples with be for Linux.

1º - Download the SQLite command-line program here: http://www.hwaci.com/sw/sqlite/download.html.

2º - Put the SQLite binary in the tss dir.

3º - Run the SQLite program like this: ./sqlite.bin server.dbs

4º - Copy the following lines and paste them in the command line:

.output teamspeak.sql
.schema

.mode insert ts2_bans
select * from ts2_bans;

.mode insert ts2_channel_privileges
select * from ts2_channel_privileges;

.mode insert ts2_channels
select * from ts2_channels;

.mode insert ts2_clients
select *,0 from ts2_clients;

.mode insert ts2_server_privileges
select * from ts2_server_privileges;

.mode insert ts2_servers
select * from ts2_servers;

.exit

Now you have a teamspeak.sql file with all that u need to export for a MySQL database.

Best Regards
Rivotti

madcat
10-03-2004, 22:15
yeah i also wrote a little script for it

read more here:
http://teamspeak.org/forums/showthread.php?s=&threadid=9270&perpage=1&pagenumber=68

or download here:
http://madcat.student.utwente.nl/teamspeak_server.dbs_to_sql.exe