Skip to content

Migrate TeamSpeak 3 from SQLite to MySQL

One of the things I wanted to do was migrate my teamspeak server from SQLite to MySQL so I created the below which makes the migration easy.

1. Stop the TeamSpeak Server

2.Run the following command to export configuration:

sqlite3 ts3server.sqlitedb .dump | grep -v "sqlite_sequence" |grep -v "COMMIT;" | grep -v "BEGIN TRANSACTION;" | grep -v "PRAGMA " | sed 's/autoincrement/auto_increment/Ig' | sed 's/"/`/Ig' > ts3_export.sql

This will export the SQLite configuration in MySQL Format to a file called ts3_export.sql

3. Import the configuration to MySQL:

mysql -u username -p database_name < ts3_export.sql

This will import the ts3_export.sql file into a database of your choosing.

4. edit ts3server.ini to the following:

machine_id=
default_voice_port=9987
voice_ip=0.0.0.0
licensepath=
filetransfer_port=30033
filetransfer_ip=0.0.0.0
query_port=10011
query_ip=0.0.0.0
query_ip_whitelist=query_ip_whitelist.txt
query_ip_blacklist=query_ip_blacklist.txt
dbplugin=ts3db_mysql
dbpluginparameter=ts3db_mysql.ini
dbsqlpath=sql/
dbsqlcreatepath=create_mysql/
dbconnections=10
logpath=logs
logquerycommands=0
dbclientkeepdays=30
logappend=0

5. Create a file called ts3db_mysql.ini which contains:

[config]
host=localhost
port=3306
username=ts3user
password=ts3password
database=ts3db
socket=

6. Start TeamSpeak and it should now be working on MySQL

Published inTeamSpeak 3

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *