Reading Time: 2 minutes, 11 secs

Teamspeak 3 on CentOS 7 using MariaDB Database (

This tutorial takes you through setting up Teamspeak 3 on CentOS 7, I will also be going through using a MariaDB database for the backend and a custom system services script.

We are using MariaDB as MySQL no longer ships with CentOS and MariaDB is a fork of MySQL

Checkout the video at YouTube:

A few prerequisites that will be required before proceeding with this tutorial:

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.

Our installation is complete so we can configure MySQL with a Database and User for Teamspeak to utilise:

Secure MySQL follow the wizard:

Login to MySQL:

Run These queries:

Once the MySQL Database is set-up along with a user we will create a system service script for Teamspeak so that we can start the server as a service, create the script: vi /usr/lib/systemd/system/ts3server.service

sudo to our TS3 user 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:
su as TS3User:

Download TS3, extract:

We must edit ts3server.ini which stores the configuration for the teamspeak server, we will be changing the config to work with MySQL instead of SQLite: vi ts3server.ini

We must also 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, su back in as root:

Enable the plugin library, service and start it:

Now our server installation is completed we can open the ports on our firewall:

Server Query (good idea to restrict IP):

File Transfer:

Reload the firewall:

and connect with our TS3 Client. The first person to logon will be asked to provide a privilege key, enter the one retrieved during the installation.

  1. Charliemopps

    This guide doesn’t work.

    2016-07-25 01:52:00.055067|INFO |ServerLibPriv | |TeamSpeak 3 Server (2016-04-25 15:16:45)
    2016-07-25 01:52:00.055292|INFO |ServerLibPriv | |SystemInformation: Linux 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 Binary: 64bit
    2016-07-25 01:52:00.056538|INFO |DatabaseQuery | |dbPlugin name: MariaDB plugin, (c)TeamSpeak Systems GmbH
    2016-07-25 01:52:00.056592|INFO |DatabaseQuery | |dbPlugin version: 1
    2016-07-25 01:52:00.068758|ERROR |DatabaseQuery | |mysql_real_connect() failed with error: Access denied for user ‘ts3user’@’localhost’ (using password: YES)
    2016-07-25 01:52:00.068825|CRITICAL|ServerLibPriv | |Server() unable to initialize database

    • It looks like you are using Localhost instead of to authenticate against, this is very important step as it wont work with Localhost.

  2. Someone

    You forgot to add in here to reload the firewall. firewall-cmd –reload. It didn’t work for me until that.

  3. Fedge

    I tried this basic idea on a Fedora server and it mostly worked except that the part where you manually start Teamspeak should probably reference the ini file that you created, otherwise the program creates an SQLite database in it’s home directory, presumably storing your admin info in it and does not create the MariaDB tables so it basically looks like it isn’t working. I think you’d want to have the right administrative passwords and stuff as well if you’re running a live server so that would be rather important.

    • Hi Fedge,

      This tutorial is for CentOS 7, the ini file is picked up as long as it is in the same directory as the other files etc.


Leave a Comment.