> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/tposs/6.14/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/tposs/6.14/configuration/database.md).

# MySQL configuration and requirements

The following versions are supported by TPOSS:

- Mariadb 10.3 to 10.5
- MySQL 5.7 including the latest 5.7.33 (but `ONLY_FULL_GROUP_BY` sql mode should be disabled).

MySQL 8 is supported as well in context of compatibility but we observed performance issues with
insert operations.

TPOSS compatible to run within MariaDB Galera cluster and MySQL NDB cluster and does not have
any specific limitations according to [MySQL NDB](https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-limitations-syntax.html)
and [MariaDB Galera Cluster](https://mariadb.com/kb/en/mariadb-galera-cluster-known-limitations) documentations.

To operate on MySQL TPOSS should have created database. Create UTF-8 encoded databases named `tposs`
and a user with **all** permissions for these databases.

Appropriate commands to create the databases would be:

```sql
CREATE DATABASE tposs CHARACTER SET UTF8 COLLATE utf8_bin;
```

If TPOSS is configured to have the CDR table parittioned the MySQL event scheduler should be enabled with the command:

```sql
SET GLOBAL event_scheduler = ON;
```

Please note, that the size of the connection pool configured in the database needs to match the
expectation of the applications. For example: A database connected to two TPOSS
instances with configured pool sizes of 100 needs to be able to handle at least 200 connections.
The possible amount of connections could be checked via `max_connections` MySQL variable
with the:

```sql
SHOW VARIABLES LIKE "max_connections";
```

command. Usually it worth to set `max_connections` to a bit bigger value than pool size of
all TPOSS instances to have separate access via standard MySQL client to the database.
