Reading Time: 1 minute, 42 secs

Teamspeak 3 with MySQL on CentOS 6.x ( Onwards)

By default Teamspeak 3 uses a SQLite database, most people tend to use this however for those of us that prefer MySQL there is a way to change it.

Follow this small tutorial to create a Teamspeak 3 Server on CentOS 6.x using a MySQL Database!

First we need to install or upgrade MySQL:


Now we need to create a new user on our server, this user will be used for the installation and running of teamspeak. For security reasons this user will not have sudo etc.

We are now in a position where we can configure MySQL with a Database and User for Teamspeak

Once the MySQL Database is set-up along with a user we will create an init script for Teamspeak so that we can start the server as a service, create the script: vi /etc/init.d/teamspeak

Now we will login with our new ts3user created at the beginning of this tutorial, download Teamspeak Server 3 64-bit for Linux and extract in your home directory, get the latest version here:
As TS3User:

As Root:

As Ts3user:
ts3server.ini stores the configuration for the teamspeak server, we need to edit this to work with MySQL instead of SQLite: vi ts3server.ini

We must now create a file called ts3db_mariadb.ini, this will hold your database login details:

Start Teamspeak:

You should now see that teamspeak 3 is installed and you will see a message on screen with a privilege token and your server query admin account details, it is important to copy these as you will need them to administer your server.

Stop the server:

Check the logs in the log directory. if everything is OK, log back in as root, enable the service and start it:






  1. idx

    Hey again 🙂
    Tutorial looks great!
    However, while executing this command” cp redist/ /lib64/″ i got a permission denied
    “cp: cannot create regular file `/lib64/′: Permission denied”
    i tried to load it anyways and it came back with this: => (0x00007fffd7cae000) => not found => /lib64/ (0x00007f100f557000) => /lib64/ (0x00007f100f1c3000)
    /lib64/ (0x00007f100fadd000)

    • Hi, sorry that’s my fault I should have put you need to be logged on with root to perform this command. Also make sure the owner of all the teamspeak3-server files is ts3user:ts3user this must be correct or you will have issues later on.

  2. idx

    -On the start line
    do i use the command “./ start inifile=ts3server.ini”
    in old tutorial u said it tells where the configuration file is….
    or i just do it using “./ start” ?

  3. Mike

    Hey buddy..
    Thx for the tutorial it works great but i have some issues
    1- when i reboot my vps ts wont start cuz access is denied to db with user ts3user
    ” mysql_real_connect() failed with error: Access denied for user ‘ts3user’@’localhost’ (using password: YES) ” (error message from ts3 log )
    also when trying to use this command ” service teamspeak start ” it gives back this error message
    ” CRITICAL|ServerLibPriv | | Server() unable to initialize database ”
    2- i cant upload icons to teamspeak ( cant use file transfer apparently ) error message ” could not open file transfer connection ”
    it might be port problem correct me if im worng

    • Hi Mike,
      1. Please try the following command when logged into MySQL I have found some situations dont like the use of “localhost”
      grant all on ts3db.* to 'ts3user'@'' identified by 'ts3password';
      flush privileges;

      2. This is due to ports, please make sure you open 30033 that should resolve your issue.


  4. Mike

    Hi Steve,
    Replacing ” ” with ” localhost ” fixed the problem somehow..tho i think it created a new db because when TS started it asked me for privilege key..
    and as for the port problem..file transfer port is 30033, i changed that to something else in ” ts3server.ini ” and it works fine now (30033 might be blocked by my VPS host for some reasons )
    Thanks for help.

  5. Traace

    Line 32: Error “su” not found. It happens always. Any script. Whats wrong with them

    • Hi, Im sorry I don’t understand when you are having this issue? If you could let me know I may be able to assist, however SU is part of CentOS operating system by default.

Leave a Comment.