Server System Variables

MySQL and MariaDB

Audience
Public
Source Type
Documentation

Server System variables are global values which can effect the behavior of various components. Server System variables are different to the variables used for storage engine configuration as they either do not affect or apply across multiple storage engines (where applicable).

The following Server System variables can impact storage configuration :

Parameter Name

Description

Default Value

Recommended Value

basedir

The path to the MariaDB installation base directory.

Microsoft Windows - C:\Program Files\MariaDB <version>\

Linux - /var/lib/mysql

Only change this if using a separate layout for data, binary and transaction log directories.

datadir

The path to the MariaDB server data directory.

Microsoft Windows - C:\Program Files\MariaDB <version>\Data

Linux - /var/lib/mysql

Only change this if using a separate layout for data, binary and transaction log directories.

table_open_cache

The number of open tables cached in one table cache instance.

2000

If the value of opened tables is too large (see Optimizing table_open_cache) then increase this value.

table_open_cache_instances

The number of open tables cache instances.

8

To improve scalability by reducing contention among sessions the open tables cache can be partitioned into several smaller cache instances. Modify this value in conjunction with table_open_cache to tune the workload to achieve higher performance.

open_files_limit

The number of file descriptors available to MariaDB from the operating system

5000

Depending on required number of open descriptors , for example a single MyIASM table could have 3 open descriptors.

Will require system limits (ulimit -n) to be set for Linux Operating Systems.