Server System Variables
About the Server System Variables
MariaDB has many system variables that can be changed to suit your needs.
Many of the general system variables are described on this page, but others are described elsewhere:
See also the Full list of MariaDB options, system and status variables.
Most of these can be set with command line options and many of them can be changed at runtime. Variables that can be changed at runtime (and therefore are not read-only) are described as "Dynamic" below, and elsewhere in the documentation.
There are a few ways to see the full list of server system variables:
While in the mariadb client, run:
SHOW VARIABLES;See SHOW VARIABLES for instructions on using this command.
From your shell, run mariadbd like so:
mariadbd --verbose --helpView the Information Schema GLOBAL_VARIABLES, SESSION_VARIABLES, and SYSTEM_VARIABLES tables.
Setting Server System Variables
There are several ways to set server system variables:
Specify them on the command line:
shell> ./mariadbd-safe --aria_group_commit="hard"Specify them in your my.cnf file (see Configuring MariaDB with my.cnf for more information):
aria_group_commit = "hard"Set them from the mariadb client using the SET command. Only variables that are dynamic can be set at runtime in this way. Note that variables set in this way will not persist after a restart.
SET GLOBAL aria_group_commit="hard";By convention, server variables have usually been specified with an underscore in the configuration files, and a dash on the command line. You can however specify underscores as dashes - they are interchangeable.
Variables that take a numeric size can either be specified in full, or with a suffix for easier readability. Valid suffixes are:
K
kilobytes
1024
M
megabytes
10242
G
gigabytes
10243
The suffix can be upper or lower-case.
List of Server System Variables
allow_suspicious_udfs
allow_suspicious_udfsDescription: Allows use of user-defined functions consisting of only one symbol
x()without correspondingx_init()orx_deinit(). That also means that one can load any function from any library, for exampleexit()fromlibc.so. Not recommended unless you require old UDFs with one symbol that cannot be recompiled. Before MariaDB 10.10, available as an option only.Command line:
--allow-suspicious-udfsScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFFIntroduced: MariaDB 10.10
alter_algorithm
alter_algorithmDescription: The implied
ALGORITHMfor ALTER TABLE if noALGORITHMclause is specified. The deprecated variable old_alter_table is an alias for this. The feature was removed in MariaDB 11.5. See ALGORITHM=DEFAULT.COPYcorresponds to the pre-MySQL 5.1 approach of creating an intermediate table, copying data one row at a time, and renaming and dropping tables.INPLACErequests that the operation be refused if it cannot be done natively inside a the storage engine.DEFAULT(the default) choosesINPLACEif available, and falls back toCOPY.NOCOPYrefuses to copy a table.INSTANTrefuses an operation that would involve any other than metadata changes.
Command line:
--alter-algorithm=defaultScope: Global, Session
Dynamic: Yes
Data Type:
enumeratedDefault Value:
DEFAULTValid Values:
DEFAULT,COPY,INPLACE,NOCOPY,INSTANTIntroduced: MariaDB 10.3.7
Deprecated: MariaDB 11.5
analyze_max_length
analyze_max_lengthDescription: Prevents collection of column statistics for
CHAR/VARCHARcolumns that can be analyzed automatically byANALYZE TABLE PERSISTENT. Columns exceeding this threshold in bytes will be skipped unless included explicitly inFOR COLUMNS(...).Command line:
--analyze-max-length=valScope: Global, Session
Dynamic: Yes
Data Type:
INT UNSIGNEDDefault Value:
4294967295 (4G)Range:
32to4294967295
analyze_sample_percentage
analyze_sample_percentageDescription: Percentage of rows from the table ANALYZE TABLE will sample to collect table statistics. Set to 0 to let MariaDB decide what percentage of rows to sample.
Command line:
--analyze-sample-percentage=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
100.000000Range:
0to100Introduced: MariaDB 10.4.3
autocommit
autocommitDescription: If set to 1, the default, all queries are committed immediately. The LOCK IN SHARE MODE and FOR UPDATE clauses therefore have no effect. If set to 0, they are only committed upon a COMMIT statement, or rolled back with a ROLLBACK statement. If autocommit is set to 0, and then changed to 1, all open transactions are immediately committed.
Command line:
--autocommit[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
1
automatic_sp_privileges
automatic_sp_privilegesDescription: When set to 1, the default, when a stored routine is created, the creator is automatically granted permission to ALTER (which includes dropping) and to EXECUTE the routine. If set to 0, the creator is not automatically granted these privileges.
Command line:
--automatic-sp-privileges,--skip-automatic-sp-privilegesScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
1
back_log
back_logDescription: Connections take a small amount of time to start, and this setting determines the number of outstanding connection requests MariaDB can have, or the size of the listen queue for incoming TCP/IP requests. Requests beyond this will be refused. Increase if you expect short bursts of connections. Cannot be set higher than the operating system limit (see the Unix listen() man page). If not set, set to
0, or the--autoset-back-logoption is used, will be autoset to the lower of900and (50 + max_connections/5).Command line:
--back-log=#Scope: Global
Dynamic: No
Type: number
Default Value:
The lower of
900and (50 + max_connections/5)
basedir
basedirDescription: Path to the MariaDB installation directory. Other paths are usually resolved relative to this base directory.
Command line:
--basedir=pathor-b pathScope: Global
Dynamic: No
Type: directory name
big_tables
big_tablesDescription: If this system variable is set to 1, then temporary tables will be saved to disk intead of memory.
This system variable's original intention was to allow result sets that were too big for memory-based temporary tables and to avoid the resulting 'table full' errors.
This system variable is no longer needed, because the server can automatically convert large memory-based temporary tables into disk-based temporary tables when they exceed the value of the tmp_memory_table_size system variable.
To prevent memory-based temporary tables from being used at all, set the tmp_memory_table_size system variable to
0.In MariaDB 5.5 and earlier, sql_big_tables is a synonym.
From MariaDB 10.5, this system variable is deprecated.
Command line:
--big-tablesScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0Deprecated: MariaDB 10.5.0
Removed: MariaDB 12.0
bind_address
bind_addressDescription: By default, the MariaDB server listens for TCP/IP connections on all addresses. You can specify an alternative when the server starts using this option; either a host name, an IPv4 or an IPv6 address, "::" or "" (all addresses). In some systems, such as Debian and Ubuntu, the bind_address is set to 127.0.0.1, which binds the server to listen on localhost only.
bind_addresshas always been available as a mariadbd option; from MariaDB 10.3.3 its also available as a system variable. Before MariaDB 10.6.0 "::" implied listening additionally on IPv4 addresses like "". From 10.6.0 onwards it refers to IPv6 stictly. Starting with MariaDB 10.11, a comma-separated list of addresses to bind to can be given. See also Configuring MariaDB for Remote Client Access.Command line:
--bind-address=addrScope: Global
Dynamic: No
Data Type:
stringDefault Value: (Empty string)
Valid Values: Host name, IPv4, IPv6, ::, *
Introduced: MariaDB 10.3.3 (as a system variable)
block_encryption_mode
block_encryption_modeDescription: Default block encryption mode for AES_ENCRYPT() and AES_DECRYPT() functions.
Command line:
--block-encryption-mode=valScope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
aes-128-ecbValid values:
aes-128-ecb,aes-192-ecb,aes-256-ecb,aes-128-cbc,aes-192-cbc,aes-256-cbc,aes-128-ctr,aes-192-ctr,aes-256-ctrIntroduced: MariaDB 11.2.0
bulk_insert_buffer_size
bulk_insert_buffer_sizeCommand line:
--bulk-insert-buffer-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
8388608Range - 32 bit:
0to4294967295Range - 64 bit:
0to18446744073709547520
character_set_client
character_set_clientDescription: Determines the character set for queries arriving from the client. It can be set per session by the client, although the server can be configured to ignore client requests with the
--skip-character-set-client-handshakeoption. If the client does not request a character set, or requests a character set that the server does not support, the global value will be used. utf16, utf16le, utf32 and ucs2 cannot be used as client character sets. From MariaDB 10.6, theutf8character set (and related collations) is by default an alias forutf8mb3rather than the other way around. It can be set to implyutf8mb4by changing the value of the old_mode system variable.Scope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
>= MariaDB 11.6:
utf8mb4<= MariaDB 11.5:
latin1
character_set_collations
character_set_collationsDescription: Overrides for character set default collations. Takes a comma-delimited list of character set and collation settings, for example
SET @@character_set_collations = 'utf8mb4=uca1400_ai_ci, latin2=latin2_hungarian_ci';The new variable will take effect in all cases where a character set is explicitly or implicitly specified without an explicit COLLATE clause, including but not limited to:Column collation
Table collation
Database collation
CHAR(expr USING csname)
CONVERT(expr USING csname)
CAST(expr AS CHAR CHARACTER SET csname)
'' - character string literal
_utf8mb3'text' - a character string literal with an introducer
_utf8mb3 X'61' - a character string literal with an introducer with hex notation
_utf8mb3 0x61 - a character string literal with an introducer with hex hybrid notation
@@collation_connection after a SET NAMES without COLLATE
Scope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
utf8mb3=utf8mb3_uca1400_ai_ci, ucs2=ucs2_uca1400_ai_ci, utf8mb4=utf8mb4_uca1400_ai_ci, utf16=utf16_uca1400_ai_ci, utf32=utf32_uca1400_ai_ci(>= MariaDB 11.5)Empty (<= MariaDB 11.4)
Introduced: MariaDB 11.2
character_set_connection
character_set_connectionDescription: Character set used for number to string conversion, as well as for literals that don't have a character set introducer. From MariaDB 10.6, the
utf8character set (and related collations) is by default an alias forutf8mb3rather than the other way around. It can be set to implyutf8mb4by changing the value of the old_mode system variable.Scope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
>= MariaDB 11.6:
utf8mb4>= MariaDB 10.6:
utf8mb3<= MariaDB 10.5:
utf8
character_set_database
character_set_databaseDescription: Character set used by the default database, and set by the server whenever the default database is changed. If there's no default database, character_set_database contains the same value as character_set_server. This variable is dynamic, but should not be set manually, only by the server.
Scope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
utf8mb4(>= MariaDB 11.6.0),latin1(<= MariaDB 11.5)
character_set_filesystem
character_set_filesystemDescription: The character set for the filesystem. Used for converting file names specified as a string literal from character_set_client to character_set_filesystem before opening the file. By default set to
binary, so no conversion takes place. This could be useful for statements such as LOAD_FILE() or LOAD DATA INFILE on system where multi-byte file names are use.Command line:
--character-set-filesystem=nameScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
binary
character_set_results
character_set_resultsDescription: Character set used for results and error messages returned to the client. From MariaDB 10.6, the
utf8character set (and related collations) is by default an alias forutf8mb3rather than the other way around. It can be set to implyutf8mb4by changing the value of the old_mode system variable.Scope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
utf8mb3(>= MariaDB 10.6),utf8(<= MariaDB 10.5)
character_set_server
character_set_serverDescription: Default character set used by the server. See character_set_database for character sets used by the default database. Defaults may be different on some systems, see for example Differences in MariaDB in Debian.
Command line:
--character-set-serverScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
utf8mb4(>= MariaDB 11.6.0),latin1(<= MariaDB 11.5)
character_set_system
character_set_systemDescription: Character set used by the server to store identifiers, always set to utf8, or its synonym utf8mb3 starting with MariaDB 10.6. From MariaDB 10.6, the
utf8character set (and related collations) is by default an alias forutf8mb3rather than the other way around. It can be set to implyutf8mb4by changing the value of the old_mode system variable.Scope: Global
Dynamic: No
Data Type:
stringDefault Value:
utf8mb3(>= MariaDB 10.6),utf8(<= MariaDB 10.5)
character_sets_dir
character_sets_dirDescription: Directory where the character sets are installed.
Command line:
--character-sets-dir=pathScope: Global
Dynamic: No
Type: directory name
check_constraint_checks
check_constraint_checksDescription: If set to
0, will disable constraint checks, for example when loading a table that violates some constraints that you plan to fix later.Scope: Global, Session
Dynamic: Yes
Type: boolean
Default: ON
collation_connection
collation_connectionDescription: Collation used for the connection character set.
Scope: Global, Session
Dynamic: Yes
Data Type:
string
collation_database
collation_databaseDescription: Collation used for the default database. Set by the server if the default database changes, if there is no default database the value from the
collation_servervariable is used. This variable is dynamic, but should not be set manually, only by the server.Scope: Global, Session
Dynamic: Yes
Data Type:
string
collation_server
collation_serverDescription: Default collation used by the server. This is set to the default collation for a given character set automatically when character_set_server is changed, but it can also be set manually. Defaults may be different on some systems, see for example Differences in MariaDB in Debian.
Command line:
--collation-server=nameScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
latin1_swedish_ci
completion_type
completion_typeDescription: The transaction completion type. If set to
NO_CHAINor0(the default), there is no effect on commits and rollbacks. If set toCHAINor1, a COMMIT statement is equivalent to COMMIT AND CHAIN, while a ROLLBACK is equivalent to ROLLBACK AND CHAIN, so a new transaction starts straight away with the same isolation level as transaction that's just finished. If set toRELEASEor2, a COMMIT statement is equivalent to COMMIT RELEASE, while a ROLLBACK is equivalent to ROLLBACK RELEASE, so the server will disconnect after the transaction completes. Note that the transaction completion type only applies to explicit commits, not implicit commits.Command line:
--completion-type=nameScope: Global, Session
Dynamic: Yes
Data Type:
enumeratedDefault Value:
NO_CHAINValid Values:
0,1,2,NO_CHAIN,CHAIN,RELEASE
concurrent_insert
concurrent_insertDescription: If set to
AUTOor1, the default, MariaDB allows concurrent INSERTs and SELECTs for MyISAM tables with no free blocks in the data (deleted rows in the middle). If set toNEVERor0, concurrent inserts are disabled. If set toALWAYSor2, concurrent inserts are permitted for all MyISAM tables, even those with holes, in which case new rows are added at the end of a table if the table is being used by another thread. If the --skip-new option is used when starting the server, concurrent_insert is set toNEVER. Changing the variable only affects new opened tables. Use FLUSH TABLES If you want it to also affect cached tables. See Concurrent Inserts for more.Command line:
--concurrent-insert[=value]Scope: Global
Dynamic: Yes
Data Type:
enumeratedDefault Value:
AUTOValid Values:
0,1,2,AUTO,NEVER,ALWAYS
connect_timeout
connect_timeoutDescription: Time in seconds that the server waits for a connect packet before returning a 'Bad handshake'. Increasing may help if clients regularly encounter 'Lost connection to MySQL server at 'X', system error: error_number' type-errors.
Command line:
--connect-timeout=#Scope: Global
Dynamic: Yes
Type: numeric
Default Value:
10Range:
2to31536000
core_file
core_fileDescription: Write a core-file on crashes. The file name and location are system dependent. On Linux it is usually called
core.${PID}, and it is usually written to the data directory. However, this can be changed.See Enabling Core Dumps for more information.
Previously this system variable existed only as an option, but it was also made into a read-only system variable starting with MariaDB 10.3.9, MariaDB 10.2.17 and MariaDB 10.1.35.
On Windows >= MariaDB 10.4.3, this option is set by default.
Note that the option accepts no arguments; specifying
--core-filesets the value toON. It cannot be disabled in the case of Windows >= MariaDB 10.4.3.
Command line:
--core-fileScope: Global
Dynamic: No
Type: boolean
Default Value:
Windows >= MariaDB 10.4.3:
ONAll other systems:
OFF
datadir
datadirDescription: Directory where the data is stored.
Command line:
--datadir=pathor-h pathScope: Global
Dynamic: No
Type: directory name
date_format
date_formatDescription: Unused.
Removed: MariaDB 11.3.0
datetime_format
datetime_formatDescription: Unused.
Removed: MariaDB 11.3.0
debug/debug_dbug
debug/debug_dbugDescription: Available in debug builds only (built with -DWITH_DEBUG=1). Used in debugging through the DBUG library to write to a trace file. Just using
--debugwill write a trace of what mariadbd is doing to the default trace file.Command line:
-#,--debug[=debug_options]Scope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
= MariaDB 10.5:
d:t:i:o,/tmp/mariadbd.trace(Unix) ord:t:i:O,\mariadbd.trace(Windows)
Debug Options: See the option flags on the mysql_debug page
debug_no_thread_alarm
debug_no_thread_alarmDescription: Disable system thread alarm calls. Disabling it may be useful in debugging or testing, never do it in production.
Command line:
--debug-no-thead-alarm=#Scope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFFRemoved: MariaDB 11.4
debug_sync
debug_syncDescription: Used in debugging to show the interface to the Debug Sync facility. MariaDB needs to be configured with -DENABLE_DEBUG_SYNC=1 for this variable to be available.
Scope: Session
Dynamic: Yes
Data Type:
stringDefault Value:
OFForON - current signal name
default_password_lifetime
default_password_lifetimeDescription: This defines the global password expiration policy. 0 means automatic password expiration is disabled. If the value is a positive integer N, the passwords must be changed every N days. This behavior can be overridden using the password expiration options in ALTER USER.
Command line:
--default-password-lifetime=#Scope: Global
Dynamic: Yes
Type: numeric
Default Value:
0Range:
0to4294967295
default_regex_flags
default_regex_flagsDescription: Introduced to address remaining incompatibilities between PCRE and the old regex library. Accepts a comma-separated list of zero or more of the following values:
Value
Pattern equivalent
Meaning
DOTALL
(?s)
. matches anything including NL
DUPNAMES
(?J)
Allow duplicate names for subpatterns
EXTENDED
(?x)
Ignore white space and comments
EXTRA
(?X)
extra features (e.g. error on unknown escape character)
MULTILINE
(?m)
^ and $ match newlines within data
UNGREEDY
(?U)
Invert greediness of quantifiers
Command line:
--default-regex-flags=valueScope: Global, Session
Dynamic: Yes
Type: enumeration
Default Value: empty
Valid Values:
DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY
default_storage_engine
default_storage_engineDescription: The default storage engine. The default storage engine must be enabled at server startup or the server won't start.
Command line:
--default-storage-engine=nameScope: Global, Session
Dynamic: Yes
Type: enumeration
Default Value:
InnoDB
default_table_type
default_table_typeDescription: A synonym for default_storage_engine. Removed in MariaDB 5.5.
Command line:
--default-table-type=nameScope: Global, Session
Dynamic: Yes
Removed: MariaDB 5.5
default_tmp_storage_engine
default_tmp_storage_engineDescription: Default storage engine that will be used for tables created with CREATE TEMPORARY TABLE where no engine is specified. For internal temporary tables see aria_used_for_temp_tables). The storage engine used must be active or the server will not start. See default_storage_engine for the default for non-temporary tables. Defaults to NULL, in which case the value from default_storage_engine is used. ROCKSDB temporary tables cannot be created. Before MariaDB 10.7, attempting to do so would silently fail, and a MyISAM table would instead be created. From MariaDB 10.7, an error is returned.
Command line:
--default-tmp-storage-engine=nameScope: Global, Session
Dynamic: Yes
Data Type:
enumerationDefault Value: NULL
default_week_format
default_week_formatDescription: Default mode for the WEEK() function. See that page for details on the different modes
Command line:
--default-week-format=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to7
delay_key_write
delay_key_writeDescription: Specifies how MyISAM tables handles CREATE TABLE DELAY_KEY_WRITE. If set to
ON, the default, any DELAY KEY WRITEs are honored. The key buffer is then flushed only when the table closes, speeding up writes. MyISAM tables should be automatically checked upon startup in this case, and --external locking should not be used, as it can lead to index corruption. If set toOFF, DELAY KEY WRITEs are ignored, while if set toALL, all new opened tables are treated as if created with DELAY KEY WRITEs enabled.Command line:
--delay-key-write[=name]Scope: Global
Dynamic: Yes
Data Type:
enumerationDefault Value:
ONValid Values:
ON,OFF,ALL
delayed_insert_limit
delayed_insert_limitDescription: After this many rows have been inserted with INSERT DELAYED, the handler will check for and execute any waiting SELECT statements.
Command line:
--delayed-insert-limit=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
100Range:
1to4294967295
delayed_insert_timeout
delayed_insert_timeoutDescription: Time in seconds that the INSERT DELAYED handler will wait for INSERTs before terminating.
Command line:
--delayed-insert-timeout=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
300
delayed_queue_size
delayed_queue_sizeDescription: Number of rows, per table, that can be queued when performing INSERT DELAYED statements. If the queue becomes full, clients attempting to perform INSERT DELAYED's will wait until the queue has room available again.
Command line:
--delayed-queue-size=#Scope: Global
Dynamic: Yes
Type: numeric
Default Value:
1000Range:
1 to 4294967295
disconnect_on_expired_password
disconnect_on_expired_passwordDescription: When a user password has expired (see User Password Expiry), this variable controls how the server handles clients that are not aware of the sandbox mode. If enabled, the client is not permitted to connect, otherwise the server puts the client in a sandbox mode.
Command line:
--disconnect-on-expired-password[={0|1}]Scope: Global
Dynamic: Yes
Type: boolean
Default Value:
OFF
div_precision_increment
div_precision_incrementDescription: The precision of the result of the decimal division will be the larger than the precision of the dividend by that number. By default it's
4, soSELECT 2/15would return 0.1333 andSELECT 2.0/15would return 0.13333. After setting div_precision_increment to6, for example, the same operation would return 0.133333 and 0.1333333 respectively.
From MariaDB 10.1.46, MariaDB 10.2.33, MariaDB 10.3.24, MariaDB 10.4.14 and MariaDB 10.5.5, div_precision_increment is taken into account in intermediate calculations. Previous versions did not, and the results were dependent on the optimizer, and therefore unpredictable.
In MariaDB 10.1.46, MariaDB 10.1.47, MariaDB 10.2.33, MariaDB 10.2.34, MariaDB 10.2.35, MariaDB 10.3.24, MariaDB 10.3.25, MariaDB 10.4.14, MariaDB 10.4.15, MariaDB 10.5.5 and MariaDB 10.5.6 only, the fix truncated decimal values after every division, resulting in lower precision in some cases for those versions only.
From MariaDB 10.1.48, MariaDB 10.2.35, MariaDB 10.3.26, MariaDB 10.4.16 and MariaDB 10.5.7, a different fix was implemented. Instead of truncating decimal values after every division, they are instead truncated for comparison purposes only.
For example
Versions other than MariaDB 10.1.46, MariaDB 10.1.47, MariaDB 10.2.33, MariaDB 10.2.34, MariaDB 10.2.35, MariaDB 10.3.24, MariaDB 10.3.25, MariaDB 10.4.14, MariaDB 10.4.15, MariaDB 10.5.5 and MariaDB 10.5.6:
SELECT (55/23244*1000);
+-----------------+
| (55/23244*1000) |
+-----------------+
| 2.3662 |
+-----------------+MariaDB 10.1.46, MariaDB 10.1.47, MariaDB 10.2.33, MariaDB 10.2.34, MariaDB 10.2.35, MariaDB 10.3.24, MariaDB 10.3.25, MariaDB 10.4.14, MariaDB 10.4.15, MariaDB 10.5.5 and MariaDB 10.5.6 only:
SELECT (55/23244*1000);
+-----------------+
| (55/23244*1000) |
+-----------------+
| 2.4000 |
+-----------------+This is because the intermediate result, SELECT 55/23244 takes into account div_precision_increment and results were truncated after every division in those versions only.
Command line:
--div-precision-increment=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
4Range:
0to30
encrypt_tmp_disk_tables
encrypt_tmp_disk_tablesDescription: Enables automatic encryption of all internal on-disk temporary tables that are created during query execution if aria_used_for_temp_tables=ON is set. See Data at Rest Encryption and Enabling Encryption for Internal On-disk Temporary Tables.
Command line:
--encrypt-tmp-disk-tables[={0|1}]Scope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
encrypt_tmp_files
encrypt_tmp_filesDescription: Enables automatic encryption of temporary files, such as those created for filesort operations, binary log file caches, etc. See Data at Rest Encryption.
Command line:
--encrypt-tmp-files[={0|1}]Scope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFF
encryption_algorithm
encryption_algorithmDescription: Which encryption algorithm to use for table encryption.
aes_cbcis the recommended one. See Table and Tablespace Encryption.Command line:
--encryption-algorithm=valueScope: Global
Dynamic: No
Data Type:
enumDefault Value:
noneValid Values:
none,aes_ecb,aes_cbc,aes_ctrIntroduced: MariaDB 10.1.3
Removed: MariaDB 10.1.4
enforce_storage_engine
enforce_storage_engineDescription: Force the use of a particular storage engine for new tables. Used to avoid unwanted creation of tables using another engine. For example, setting to InnoDB will prevent any MyISAM tables from being created. If another engine is specified in a CREATE TABLE statement, the outcome depends on whether the
NO_ENGINE_SUBSTITUTIONSQL_MODE has been set or not. If set, the query will fail, while if not set, a warning will be returned and the table created according to the engine specified by this variable. The variable has a session scope, but is only modifiable by a user with the SUPER privilege.Command line: None
Scope: Session
Dynamic: Yes
Data Type:
stringDefault Value:
none
engine_condition_pushdown
engine_condition_pushdownDescription: Deprecated in MariaDB 5.5 and removed and replaced by the optimizer_switch
engine_condition_pushdown={on|off}flag in MariaDB 10.0.. Specifies whether the engine condition pushdown optimization is enabled. Since MariaDB 10.1.1, engine condition pushdown is enabled for all engines that support it.Command line:
--engine-condition-pushdownScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFFDeprecated: MariaDB 5.5
Removed: MariaDB 10.0
eq_range_index_dive_limit
eq_range_index_dive_limitDescription: Limit used for speeding up queries listed by long nested INs. The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to
0(unlimited), index dives are always used.Command line:
--eq-range-index-dive-limit=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
200Range:
0to4294967295
error_count
error_countDescription: Read-only variable denoting the number of errors from the most recent statement in the current session that generated errors. See SHOW_ERRORS().
Scope: Session
Dynamic: Yes
Data Type:
numeric
event_scheduler
event_schedulerDescription: Status of the Event Scheduler. Can be set to
ONorOFF, whileDISABLEDmeans it cannot be set at runtime. Setting the variable will cause a load of events if they were not loaded at startup.Command line:
--event-scheduler[=value]Scope: Global
Dynamic: Yes
Data Type:
enumerationDefault Value:
OFFValid Values:
ON(or1),OFF(or0),DISABLED
expensive_subquery_limit
expensive_subquery_limitDescription: Number of rows to be examined for a query to be considered expensive, that is, maximum number of rows a subquery may examine in order to be executed during optimization and used for constant optimization.
Command line:
--expensive-subquery-limit=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
100Range:
0upwards
explicit_defaults_for_timestamp
explicit_defaults_for_timestampDescription: This option causes CREATE TABLE to create all TIMESTAMP columns as NULL with the DEFAULT NULL attribute, Without this option, TIMESTAMP columns are NOT NULL and have implicit DEFAULT clauses.
Command line:
--explicit-defaults-for-timestamp=[={0|1}]Scope:
Global, Session (>= MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17)
Global (<= MariaDB 10.8.3, MariaDB 10.7.4, MariaDB 10.6.8, MariaDB 10.5.16)
Dynamic:
Yes (>= MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17)
Data Type:
booleanDefault Value:
ON(>= MariaDB 10.10),OFF(<= MariaDB 10.9)
external_user
external_userDescription: External user name set by the plugin used to authenticate the client.
NULLif native MariaDB authentication is used. For example, from MariaDB 11.6, the Unix socket authentication plugin permits an authentication string, so that the OS and MariaDB user will be different.external_userthen contains the external OS user. See Authentication Plugin - Unix Socket: Creating UsersScope: Session
Dynamic: No
Data Type:
stringDefault Value:
NULL
flush
flushDescription: Usually, MariaDB writes changes to disk after each SQL statement, and the operating system handles synchronizing (flushing) it to disk. If set to
ON, the server will synchronize all changes to disk after each statement.Command line:
--flushScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
flush_time
flush_timeDescription: Interval in seconds that tables are closed to synchronize (flush) data to disk and free up resources. If set to 0, the default, there is no automatic synchronizing tables and closing of tables. This option should not be necessary on systems with sufficient resources.
Command line:
--flush_time=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
0
foreign_key_checks
foreign_key_checksDescription: If set to 1 (the default) foreign key constraints (including ON UPDATE and ON DELETE behavior) InnoDB tables are checked, while if set to 0, they are not checked.
0is not recommended for normal use, though it can be useful in situations where you know the data is consistent, but want to reload data in a different order from that specified by parent/child relationships. Setting this variable to 1 does not retrospectively check for inconsistencies introduced while set to 0.Command line: None
Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
1
ft_boolean_syntax
ft_boolean_syntaxDescription: List of operators supported by an IN BOOLEAN MODE full-text search. If you wish to change, note that each character must be ASCII and non-alphanumeric, the full string must be 14 characters and the first or second character must be a space (marking the behavior by default). Positions 10, 13 and 14 are reserved for future extensions. Also, no duplicates are permitted except for the phrase quoting characters in positions 11 and 12, which may be the same.
Command line:
--ft-boolean-syntax=nameScope: Global
Dynamic: Yes
Data Type:
stringDefault Value:
+ -><()*:""&|
ft_max_word_len
ft_max_word_lenDescription: Maximum length for a word to be included in the MyISAM full-text index. If this variable is changed, the full-text index must be rebuilt in order for the new value to take effect. The quickest way to do this is by issuing a
REPAIR TABLE table_name QUICKstatement. See innodb_ft_max_token_size for the InnoDB equivalent.Command line:
--ft-max-word-len=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
84Minimum Value:
10
ft_min_word_len
ft_min_word_lenDescription: Minimum length for a word to be included in the MyISAM full-text index. If this variable is changed, the full-text index must be rebuilt in order for the new value to take effect. The quickest way to do this is by issuing a
REPAIR TABLE table_name QUICKstatement. See innodb_ft_min_token_size for the InnoDB equivalent.Command line:
--ft-min-word-len=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
4Minimum Value:
1
ft_query_expansion_limit
ft_query_expansion_limitDescription: For full-text searches, denotes the numer of top matches when using WITH QUERY EXPANSION.
Command line:
--ft-query-expansion-limit=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
20Range:
0to1000
ft_stopword_file
ft_stopword_fileDescription: File containing a list of stopwords for use in MyISAM full-text searches. Unless an absolute path is specified the file will be looked for in the data directory. The file is not parsed for comments, so all words found become stopwords. By default, a built-in list of words (built from
storage/myisam/ft_static.c file) is used. Stopwords can be disabled by setting this variable to''(an empty string). If this variable is changed, the full-text index must be rebuilt. The quickest way to do this is by issuing aREPAIR TABLE table_name QUICKstatement. See innodb_ft_server_stopword_table for the InnoDB equivalent.Command line:
--ft-stopword-file=file_nameScope: Global
Dynamic: No
Data Type:
file nameDefault Value:
(built-in)
general_log
general_logDescription: If set to 0, the default unless the --general-log option is used, the general query log is disabled, while if set to 1, the general query log is enabled. See log_output for how log files are written. If that variable is set to
NONE, no logs will be written even if general_query_log is set to1.Command line:
--general-logScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
0
general_log_file
general_log_fileDescription: Name of the general query log file. If this is not specified, the name is taken from the log-basename setting or from your system hostname with
.logas a suffix. If --log-basename is also set,general_log_fileshould be placed after in the config files. Later settings override earlier settings, solog-basenamewill override any earlier log file name settings.Command line:
--general-log-file=file_nameScope: Global
Dynamic: Yes
Data Type:
file nameDefault Value:
host_name.log
group_concat_max_len
group_concat_max_lenDescription: Maximum length in bytes of the returned result for the functions GROUP_CONCAT(), JSON_OBJECTAGG and JSON_ARRAYAGG.
Command line:
--group-concat-max-len=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
1048576(1M)
Range:
4to4294967295
.
have_compress
have_compressDescription: If the zlib compression library is accessible to the server, this will be set to
YES, otherwise it will beNO. The COMPRESS() and UNCOMPRESS() functions will only be available if set toYES.Scope: Global
Dynamic: No
have_crypt
have_cryptDescription: If the crypt() system call is available this variable will be set to
YES, otherwise it will be set toNO. If set toNO, the ENCRYPT() function cannot be used.Scope: Global
Dynamic: No
have_csv
have_csvDescription: If the server supports CSV tables, will be set to
YES, otherwise will be set toNO. Removed in MariaDB 10.0, use the Information Schema PLUGINS table or SHOW ENGINES instead.Scope: Global
Dynamic: No
Removed: MariaDB 10.0
have_dynamic_loading
have_dynamic_loadingDescription: If the server supports dynamic loading of plugins, will be set to
YES, otherwise will be set toNO.Scope: Global
Dynamic: No
have_geometry
have_geometryDescription: If the server supports spatial data types, will be set to
YES, otherwise will be set toNO.Scope: Global
Dynamic: No
have_ndbcluster
have_ndbclusterDescription: If the server supports NDBCluster.
Scope: Global
Dynamic: No
Removed: MariaDB 10.0
have_partitioning
have_partitioningDescription: If the server supports partitioning, will be set to
YES, unless the--skip-partitionoption is used, in which case will be set toDISABLED. Will be set toNOotherwise. Removed in MariaDB 10.0 - SHOW PLUGINS should be used instead.Scope: Global
Dynamic: No
Removed: MariaDB 10.0
have_profiling
have_profilingDescription: If statement profiling is available, will be set to
YES, otherwise will be set toNO. See SHOW PROFILES() and SHOW PROFILE().Scope: Global
Dynamic: No
have_query_cache
have_query_cacheDescription: If the server supports the query cache, will be set to
YES, otherwise will be set toNO.Scope: Global
Dynamic: No
have_rtree_keys
have_rtree_keysDescription: If RTREE indexes (used for spatial indexes) are available, will be set to
YES, otherwise will be set toNO.Scope: Global
Dynamic: No
have_symlink
have_symlinkDescription: This system variable can be used to determine whether the server supports symbolic links (note that it has no meaning on Windows).
If symbolic links are supported, then the value will be
YES.If symbolic links are not supported, then the value will be
NO.If symbolic links are disabled with the --symbolic-links option and the
skipoption prefix (i.e. --skip-symbolic-links), then the value will beDISABLED.Symbolic link support is required for the INDEX DIRECTORY and DATA DIRECTORY table options.
Scope: Global
Dynamic: No
histogram_size
histogram_sizeDescription: Number of bytes used for a histogram, or, from MariaDB 10.7 when histogram_type is set to
JSON_HB, number of buckets. If set to 0, no histograms are created by ANALYZE.Command line:
--histogram-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
254Range:
0to255
histogram_type
histogram_typeDescription: Specifies the type of histograms created by ANALYZE..
SINGLE_PREC_HB- single precision height-balanced.DOUBLE_PREC_HB- double precision height-balanced.JSON_HB- JSON height-balanced histograms (from MariaDB 10.8)
Command line:
--histogram-type=valueScope: Global, Session
Dynamic: Yes
Data Type:
enumerationDefault Value:
JSON_HB(>= MariaDB 11.0)DOUBLE_PREC_HB(<= MariaDB 10.11, >= MariaDB 10.4.3)
Valid Values:
SINGLE_PREC_HB,DOUBLE_PREC_HB(<= MariaDB 10.6)SINGLE_PREC_HB,DOUBLE_PREC_HB,JSON_HB(>= MariaDB 10.8)
host_cache_size
host_cache_sizeDescription: Number of host names that will be cached to avoid resolving. Setting to
0disables the cache. Changing the value while the server is running causes an implicit FLUSH HOSTS, clearing the host cache and truncating the performance_schema.host_cache table. If you are connecting from a lot of different machines you should consider increasing. Some container configs explicitly sethost_cache_sizeto0, rather than leave it as the default,128.Command line:
--host-cache-size=#.Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
128Range:
0to65536
hostname
hostnameDescription: When the server starts, this variable is set to the server host name.
Scope: Global
Dynamic: No
Data Type:
string
identity
identityDescription: A synonym for last_insert_id variable.
idle_readonly_transaction_timeout
idle_readonly_transaction_timeoutDescription: Time in seconds that the server waits for idle read-only transactions before killing the connection. If set to
0, the default, connections are never killed. See also idle_transaction_timeout, idle_write_transaction_timeout and Transaction Timeouts.Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to31536000
idle_transaction_timeout
idle_transaction_timeoutDescription: Time in seconds that the server waits for idle transactions before killing the connection. If set to
0, the default, connections are never killed. See also idle_readonly_transaction_timeout, idle_write_transaction_timeout and Transaction Timeouts.Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to31536000
idle_write_transaction_timeout
idle_write_transaction_timeoutDescription: Time in seconds that the server waits for idle read-write transactions before killing the connection. If set to
0, the default, connections are never killed. See also idle_transaction_timeout, idle_readonly_transaction_timeout and Transaction Timeouts. Calledidle_readwrite_transaction_timeoutuntil MariaDB 10.3.2.Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to31536000
ignore_db_dirs
ignore_db_dirsDescription: Tells the server that this directory can never be a database. That means two things - firstly it is ignored by the SHOW DATABASES command and INFORMATION_SCHEMA tables. And secondly, USE, CREATE DATABASE and SELECT statements will return an error if the database from the ignored list specified. Use this option several times if you need to ignore more than one directory. To make the list empty set the void value to the option as --ignore-db-dir=. If the option or configuration is specified multiple times, viewing this value will list the ignore directories separated by commas.
Command line:
--ignore-db-dirs=dir.Scope: Global
Dynamic: No
Data Type:
string
in_predicate_conversion_threshold
in_predicate_conversion_thresholdDescription: The minimum number of scalar elements in the value list of an IN predicate that triggers its conversion to an IN subquery. Set to 0 to disable the conversion. See Conversion of Big IN Predicates Into Subqueries.
Command line:
--in-predicate-conversion-threshold=#Scope: Global, Session
Dynamic: No
Data Type:
numericDefault Value:
1000Range:
0to4294967295
in_transaction
in_transactionDescription: Session-only and read-only variable that is set to
1if a transaction is in progress,0if not.Command line: No
Scope: Session
Dynamic: No
Data Type:
booleanDefault Value:
0
init_connect
init_connectDescription: String containing one or more SQL statements, separated by semicolons, that will be executed by the server for each client connecting. If there's a syntax error in the one of the statements, the client will fail to connect. For this reason, the statements are not executed for users with the SUPER privilege or, from MariaDB 10.5.2, the CONNECTION ADMIN privilege, who can then still connect and correct the error. See also init_file.
Command line:
--init-connect=nameScope: Global
Dynamic: Yes
Data Type:
string
init_file
init_fileDescription: Name of a file containing SQL statements that will be executed by the server on startup. Each statement should be on a new line, and end with a semicolon. See also init_connect.
Command line:
init-file=file_nameScope: Global
Dynamic: No
Data Type:
file name
insert_id
insert_idDescription: Value to be used for the next statement inserting a new AUTO_INCREMENT value.
Scope: Session
Dynamic: Yes
Data Type:
numeric
interactive_timeout
interactive_timeoutDescription: Time in seconds that the server waits for an interactive connection (one that connects with the mysql_real_connect() CLIENT_INTERACTIVE option) to become active before closing it. See also wait_timeout.
Command line:
--interactive-timeout=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
28800Range: (Windows):
1to2147483Range: (Other):
1to31536000
join_buffer_size
join_buffer_sizeDescription: Minimum size in bytes of the buffer used for queries that cannot use an index, and instead perform a full table scan. Increase to get faster full joins when adding indexes is not possible, although be aware of memory issues, since joins will always allocate the minimum size. Best left low globally and set high in sessions that require large full joins. In 64-bit platforms, Windows truncates values above 4GB to 4GB with a warning.
Command line:
--join-buffer-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
262144(256kB)Range (non-Windows):
128to18446744073709547520Range (Windows):
8228to18446744073709547520
join_buffer_space_limit
join_buffer_space_limitDescription: Maximum size in bytes of the query buffer, By default 102412810.
Command line:
--join-buffer-space-limit=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
2097152Range:
2048to18446744073709551615
join_cache_level
join_cache_levelDescription: Controls which of the eight block-based algorithms can be used for join operations.
1 – flat (Block Nested Loop) BNL
2 – incremental BNL
3 – flat Block Nested Loop Hash (BNLH)
4 – incremental BNLH
5 – flat Batch Key Access (BKA)
6 – incremental BKA
7 – flat Batch Key Access Hash (BKAH)
8 – incremental BKAH
Command line:
--join-cache-level=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
2Range:
0to8
keep_files_on_create
keep_files_on_createDescription: If a MyISAM table is created with no DATA DIRECTORY option, the .MYD file is stored in the database directory. When set to
0, the default, if MariaDB finds another .MYD file in the database directory it will overwrite it. Setting this variable to1means that MariaDB will return an error instead, just as it usually does in the same situation outside of the database directory. The same applies for .MYI files and no INDEX DIRECTORY option. Deprecated in MariaDB 10.8.0.Command line:
--keep-files-on-create=#Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFFDeprecated: MariaDB 10.8.0
large_files_support
large_files_supportDescription: ON if the server if was compiled with large file support or not, else OFF
Scope: Global
Dynamic: No
large_page_size
large_page_sizeDescription: Indicates the size of memory page if large page support (Linux only) is enabled. The page size is determined from the Hugepagesize setting in
/proc/meminfo. See large_pages. Deprecated and unused in MariaDB 10.5.3 since multiple page size support was added.Scope: Global
Dynamic: No
Data Type:
numericDefault Value: Autosized (see description)
Deprecated: MariaDB 10.5.3
Removed: MariaDB 12.0
large_pages
large_pagesDescription: Indicates whether large page support (prior to MariaDB 10.5, Linux only, by now supported Windows and BSD distros, also called huge pages) is used. This is set with
--large-pagesor disabled with--skip-large-pages. Large pages are used for the innodb buffer pool and for online DDL (of size 3* innodb_sort_buffer_size (or 6 when encryption is used)). To use large pages, the Linuxsysctlvariablekernel.shmmaxmust be large than the llocation. Also thesysctlvariablevm.nr_hugepagesmultipled by large-page) must be larger than the usage. The ulimit for locked memory must be sufficient to cover the amount used (ulimit -land equalivent in /etc/security/limits.conf / or in systemd LimitMEMLOCK). If these operating system controls or insufficient free huge pages are available, the allocation of large pages will fall back to conventional memory allocation and a warning will appear in the logs. Only allocations of the defaultHugepagesizecurrently occur (see/proc/meminfo).Command line:
--large-pages,--skip-large-pagesScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFF
last_insert_id
last_insert_idDescription: Contains the same value as that returned by LAST_INSERT_ID(). Note that setting this variable doen't update the value returned by the underlying function.
Scope: Session
Dynamic: Yes
Data Type:
numeric
lc_messages
lc_messagesDescription: This system variable can be specified as a locale name. The language of the associated locale will be used for error messages. See Server Locales for a list of supported locales and their associated languages.
This system variable is set to
en_USby default, which means that error messages are in English by default.If this system variable is set to a valid locale name, but the server can't find an error message file for the language associated with the locale, then the default language will be used instead.
This system variable is used along with the lc_messages_dir system variable to construct the path to the error messages file.
See Setting the Language for Error Messages for more information.
Command line:
--lc-messages=nameScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
en_us
lc_messages_dir
lc_messages_dirDescription: This system variable can be specified either as the path to the directory storing the server's error message files or as the path to the directory storing the specific language's error message file. See Server Locales for a list of available locales and their related languages.
The server initially tries to interpret the value of this system variable as a path to the directory storing the server's error message files. Therefore, it constructs the path to the language's error message file by concatenating the value of this system variable with the language name of the locale specified by the lc_messages system variable .
If the server does not find the error message file for the language, then it tries to interpret the value of this system variable as a direct path to the directory storing the specific language's error message file.
See Setting the Language for Error Messages for more information.
Command line:
--lc-messages-dir=pathScope: Global
Dynamic: No
Data Type:
directory name
lc_time_names
lc_time_namesDescription: The locale that determines the language used for the date and time functions DAYNAME(), MONTHNAME() and DATE_FORMAT(). Locale names are language and region subtags, for example 'en_ZA' (English - South Africa) or 'es_US: Spanish - United States'. The default is always 'en-US' regardless of the system's locale setting. See server locale for a full list of supported locales.
Command line:
--lc-time-names=nameScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
en_US
legacy_xa_rollback_at_disconnect
legacy_xa_rollback_at_disconnectDescription: If a user session disconnects after putting a transaction into the
XA PREPAREstate, roll back the transaction. Can be used for backwards compatibility to enable this pre-10.5 behavior for applications that expect it. Note that this violates the XA Specification and should not be used for new code.Scope: Global, Session
Dynamic: Yes
Data Type:
booleanIntroduced: MariaDB 10.5.27, MariaDB 10.6.20, MariaDB 10.11.10, MariaDB 11.4.4, MariaDB 11.7.1
license
licenseDescription: Server license, for example
GPL.Scope: Global
Dynamic: No
Data Type:
string
local_infile
local_infileDescription: If set to
1, LOCAL is supported for LOAD DATA INFILE statements. If set to0, usually for security reasons, attempts to perform a LOAD DATA LOCAL will fail with an error message.Command line:
--local-infile=#Scope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
ON
lock_wait_timeout
lock_wait_timeoutDescription: Timeout in seconds for attempts to acquire metadata locks. Statements using metadata locks include FLUSH TABLES WITH READ LOCK, LOCK TABLES, HANDLER and DML and DDL operations on tables, stored procedures and functions, and views. The timeout is separate for each attempt, of which there may be multiple in a single statement.
0means no wait. See WAIT and NOWAIT.Command line:
--lock-wait-timeout=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
86400(1 day)
Range:
0to31536000
locked_in_memory
locked_in_memoryDescription: Indicates whether --memlock was used to lock mariadbd in memory.
Command line:
--memlockScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFF
log
logDescription: Deprecated and removed in MariaDB 10.0, use general_log instead.
Command line:
-l [filename]or--log[=filename]Scope: Global
Dynamic: Yes
Data Type:
stringDefault Value:
OFFRemoved: MariaDB 10.0
log_disabled_statements
log_disabled_statementsDescription: If set, the specified type of statements (slave and/or stored procedure statements) will not be logged to the general log. Multiple values are comma-separated, without spaces.
Command line:
--log-disabled_statements=valueScope: Global, Session
Dynamic: No
Data Type:
setDefault Value:
spValid Values:
slaveand/orsp, or empty string for none
log_error
log_errorDescription: Specifies the name of the error log. If --console is specified later in the configuration (Windows only) or this option isn't specified, errors will be logged to stderr. If no name is provided, errors will still be logged to
hostname.errin thedatadirdirectory by default. If a configuration file sets--log-error, one can reset it with--skip-log-error(useful to override a system wide configuration file). MariaDB always writes its error log, but the destination is configurable. See error log for details. Note that if --log-basename is also set,log_errorshould be placed after in the config files. Later settings override earlier settings, solog-basenamewill override any earlier log file name settings.Command line:
--log-error[=name],--skip-log-errorScope: Global
Dynamic: No
Data Type:
file nameDefault Value: (empty string)
log_output
log_outputDescription: How the output for the general query log and the slow query log is stored. By default written to file (
FILE), it can also be stored in the general_log and slow_log tables in the mysql database (TABLE), or not stored at all (NONE). More than one option can be chosen at the same time, withNONEtaking precedence if present. Logs will not be written if logging is not enabled. See Writing logs into tables, and the slow_query_log and general_log server system variables.Command line:
--log-output=nameScope: Global
Dynamic: Yes
Data Type:
setDefault Value:
FILEValid Values:
TABLE,FILEorNONE
log_queries_not_using_indexes
log_queries_not_using_indexesDescription: Queries that don't use an index, or that perform a full index scan where the index doesn't limit the number of rows, will be logged to the slow query log (regardless of time taken). The slow query log needs to be enabled for this to have an effect. Mapped to
log_slow_filter='not_using_index'from MariaDB 10.3.1.Command line:
--log-queries-not-using-indexesScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
log_slow_admin_statements
log_slow_admin_statementsDescription: Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. See also log_slow_disabled_statements and log_slow_filter. Deprecated, use log_slow_filter without
admin.Command line:
--log-slow-admin-statementsScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
ON
Deprecated: MariaDB 11.0.1
log_slow_disabled_statements
log_slow_disabled_statementsDescription: If set, the specified type of statements will not be logged to the slow query log. See also log_slow_admin_statements and log_slow_filter.
Command line:
--log-slow-disabled_statements=valueScope: Global, Session
Dynamic: No
Data Type:
setDefault Value:
spValid Vales:
admin,call,slaveand/orsp
log_slow_filter
log_slow_filterDescription: Comma-delimited string (without spaces) containing one or more settings for filtering what is logged to the slow query log. If a query matches one of the types listed in the filter, and takes longer than long_query_time, it will be logged(except for 'not_using_index' which is always logged if enabled, regardless of the time). Sets log-slow-admin-statements to ON. See also log_slow_disabled_statements.
adminlog administrative queries (create, optimize, drop etc...)filesortlogs queries that use a filesort.filesort_on_disklogs queries that perform a filesort on disk.filesort_priority_queuefull_joinlogs queries that perform a join without indexes.full_scanlogs queries that perform full table scans.not_using_indexlogs queries that don't use an index, or that perform a full index scan where the index doesn't limit the number of rows. Disregards long_query_time, unlike other options. log_queries_not_using_indexes maps to this option. From MariaDB 10.3.1.query_cachelog queries that are resolved by the query cache.query_cache_misslogs queries that are not found in the query cache.tmp_tablelogs queries that create an implicit temporary table.tmp_table_on_disklogs queries that create a temporary table on disk.
Command line:
log-slow-filter=value1[,value2...]Scope: Global, Session
Dynamic: Yes
Data Type:
enumerationDefault Value:
admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
Valid Values:
admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,not_using_index,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
log_slow_max_warnings
log_slow_max_warningsDescription: Max numbers of warnings printed to slow query log per statement
Command line:
log-slow-max-warnings=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
10Range:
0to1000Introduced: MariaDB 10.6.16, MariaDB 10.10.7, MariaDB 10.11.6, MariaDB 11.0.4, MariaDB 11.1.3
log_slow_min_examined_row_limit
log_slow_min_examined_row_limitDescription: Don't write queries to slow query log that examine fewer rows than the set value. If set to
0, the default, no row limit is used.min_examined_row_limitis an alias. From MariaDB 11.7, queries slower than log_slow_always_query_time will always be logged.Command line:
--log-slow-min-examined-row-limit=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0-4294967295Introduced: MariaDB 10.11
log_slow_queries
log_slow_queriesDescription: Deprecated and removed in MariaDB 10.0, use slow_query_log instead.
Command line:
--log-slow-queries[=name]Scope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFFRemoved: MariaDB 10.0
log_slow_query
log_slow_queryDescription: If set to 0, the default unless the --slow-query-log option is used, the slow query log is disabled, while if set to 1 (both global and session variables), the slow query log is enabled. Named slow_query_log before MariaDB 10.11.0, which is now an alias.
Command line:
--slow-query-logScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0Introduced: MariaDB 10.11.0
See also: See log_output to see how log files are written. If that variable is set to
NONE, no logs will be written even if log_slow_query is set to1.
log_slow_query_file
log_slow_query_fileDescription: Name of the slow query log file. Before MariaDB 10.11, was named slow_query_log_file. This was named
log_slow_query_file_namein the MariaDB 10.11.0 preview release. If --log-basename is also set,log_slow_query_fileshould be placed after in the config files. Later settings override earlier settings, solog-basenamewill override any earlier log file name settings.Command line:
--log-slow-query-file=file_nameScope: Global
Dynamic: Yes
Data Type:
file nameDefault Value:
host_name-slow.logIntroduced: MariaDB 10.11.0
log_slow_query_time
log_slow_query_timeDescription: If a query takes longer than this many seconds to execute (microseconds can be specified too), the Slow_queries status variable is incremented and, if enabled, the query is logged to the slow query log. Before MariaDB 10.11, was named long_query_time. Affected by log_slow_rate_limit and log_slow_min_examined_row_limit.
Command line:
--log-slow-query-time=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
10.000000Range:
0to31536000Introduced: MariaDB 10.11.0
log_slow_rate_limit
log_slow_rate_limitDescription: The slow query log will log every this many queries. The default is
1, or every query, while setting it to20would log every 20 queries, or five percent. Aims to reduce I/O usage and excessively large slow query logs. See also Slow Query Log Extended Statistics. From MariaDB 11.7, queries slower than log_slow_always_query_time will always be logged.Command line:
log-slow-rate-limit=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
1Range:
1upwards
log_slow_verbosity
log_slow_verbosityDescription: Controls information to be added to the slow query log. Options are added in a comma-delimited string. See also Slow Query Log Extended Statistics. log_slow_verbosity is not supported when log_output='TABLE'.
query_planlogs query execution plan informationinnodbAlias toengine(from MariaDB 10.6.15 and MariaDB 10.11.5), previously ignored.explainprints EXPLAIN output in the slow query log. See EXPLAIN in the Slow Query Log.engineLogs engine statistics (from MariaDB 10.6.15 and MariaDB 10.11.5).warningsPrint all errors, warnings and notes for the statement to the slow query log. (from MariaDB 10.6.16).allEnables all above options (From MariaDB 10.6.16)fullEnables all above options.
Command line:
log-slow-verbosity=value1[,value2...]Scope: Global, Session
Dynamic: Yes
Data Type:
enumerationDefault Value: (Empty)
Valid Values:
= MariaDB 10.6.16, MariaDB 10.11.6: (Empty),
query_plan,innodb,explain,engine,warnings,all,full= MariaDB 10.6.15, MariaDB 10.11.5: (Empty),
query_plan,innodb,explain,engine,full<= MariaDB 10.6.14, MariaDB 10.11.4: (Empty),
query_plan,innodb,explain
log_tc_size
log_tc_sizeDescription: Defines the size in bytes of the memory-mapped file-based transaction coordinator log, which is only used if the binary log is disabled. If you have two or more XA-capable storage engines enabled, then a transaction coordinator log must be available. This size is defined in multiples of 4096. See Transaction Coordinator Log for more information. Also see the --log-tc server option and the --tc-heuristic-recover option.
Command line:
log-tc-size=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
24576Range:
12288to18446744073709551615
log_warnings
log_warningsDescription: Determines which additional warnings are logged. Setting to
0disables additional warning logging. Note that this does not prevent all warnings, there is a core set of warnings that will always be written to the error log. The additional warnings are as follows:log_warnings >= 1
Event scheduler information.
System signals.
Wrong usage of
--user.Failed setrlimit() and mlockall().
Changed limits.
Wrong values of lower_case_table_names and stack_size.
Wrong values for command line options.
Start log position and some master information when starting slaves.
Slave reconnects.
Killed slaves.
Error reading relay logs.
Unsafe statements for statement-based replication. If this warning occurs frequently, it is throttled to prevent flooding the log.
Disabled plugins that one tried to enable or use.
UDF files that didn't include the required init functions.
DNS lookup failures.
log_warnings >= 2
Access denied errors.
Connections aborted or closed due to errors or timeouts.
Table handler errors.
Messages related to the files used to persist replication state:
Either the default
master.infofile or the file that is configured by the master_info_file option.Either the default
relay-log.infofile or the file that is configured by the relay_log_info_file system variable.
Information about a master's binary log dump thread.
log_warnings >= 3
All errors and warnings during MyISAM repair and auto recover.
Information about old-style language options.
Information about progress of InnoDB online DDL.
log_warnings >=4
Connections aborted due to "Too many connections" errors.
Connections closed normally without authentication.
Connections aborted due to KILL.
Connections closed due to released connections, such as when completion_type is set to
RELEASE.Could not read packet: (a lot more information)
All read/write errors for a connection are logged to the error log.
log_warnings >=9
Information about initializing plugins.
Command line:
-W [level]or--log-warnings[=level]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
2Range:
0to4294967295
long_query_time
long_query_timeDescription: If a query takes longer than this many seconds to execute (microseconds can be specified too), the Slow_queries status variable is incremented and, if enabled, the query is logged to the slow query log. From MariaDB 10.11.0, this is an alias for log_slow_query_time.
Command line:
--long-query-time=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
10.000000Range:
0upwards
low_priority_updates
low_priority_updatesDescription: If set to 1 (0 is the default), for storage engines that use only table-level locking (Aria, MyISAM, MEMORY and MERGE), all INSERTs, UPDATEs, DELETEs and LOCK TABLE WRITEs will wait until there are no more SELECTs or LOCK TABLE READs pending on the relevant tables. Set this to 1 if reads are prioritized over writes.
In MariaDB 5.5 and earlier, sql_low_priority_updates is a synonym.
Command line:
--low-priority-updatesScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0
lower_case_file_system
lower_case_file_systemDescription: Read-only variable describing whether the file system is case-sensitive. If set to
OFF, file names are case-sensitive. If set toON, they are not case-sensitive.Scope: Global
Dynamic: No
Data Type:
booleanDefault Value:
##
lower_case_table_names
lower_case_table_namesDescription: If set to
0(the default on Unix-based systems), table names and aliases and database names are compared in a case-sensitive manner. If set to1(the default on Windows), names are stored in lowercase and not compared in a case-sensitive manner. If set to2(the default on Mac OS X), names are stored as declared, but compared in lowercase. This system variable's value cannot be changed after the datadir has been initialized. lower_case_table_names is set when a MariaDB instance starts, and it remains constant afterwards.Command line:
--lower-case-table-names[=#]Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
0(Unix),1(Windows),2(Mac OS X)Range:
0to2
max_allowed_packet
max_allowed_packetDescription: Maximum size in bytes of a packet or a generated/intermediate string. The packet message buffer is initialized with the value from net_buffer_length, but can grow up to max_allowed_packet bytes. Set as large as the largest BLOB, in multiples of 1024. If this value is changed, it should be changed on the client side as well. See slave_max_allowed_packet for a specific limit for replication purposes.
Command line:
--max-allowed-packet=#Scope: Global, Session
Dynamic: Yes (Global), No (Session)
Data Type:
numericDefault Value:
16777216(16M)1073741824(1GB) (client-side)
Range:
1024to1073741824
max_connect_errors
max_connect_errorsDescription: Limit to the number of successive failed connects from a host before the host is blocked from making further connections. The count for a host is reset to zero if they successfully connect. To unblock, flush the host cache with a FLUSH HOSTS statement or mariadb-admin flush-hosts. The performance_schema.host_cache table contains the status of the current hosts.
Command line:
--max-connect-errors=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
100Range:
1to4294967295
max_connections
max_connectionsDescription: The maximum number of simultaneous client connections. See also Handling Too Many Connections. Note that this value affects the number of file descriptors required on the operating system. Minimum was changed from
1to10to avoid possible unexpected results for the user (MDEV-18252). Note that MariaDB always has one reserved connection for aSUPER(orCONNECTION ADMINuser). Additionally it can listen on a separate port, so will be available even when the max_connections limit is reached.Command line:
--max-connections=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
151Range:
10to100000
max_delayed_threads
max_delayed_threadsDescription: Limits to the number of INSERT DELAYED threads. Once this limit is reached, the insert is handled as if there was no DELAYED attribute. If set to
0, DELAYED is ignored entirely. The session value can only be set to0or to the same as the global value.Command line:
--max-delayed-threads=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
20Range:
0to16384
max_digest_length
max_digest_lengthDescription: Maximum length considered for computing a statement digest, such as used by the Performance Schema and query rewrite plugins. Statements that differ after this many bytes produce the same digest, and are aggregated for statistics purposes. The variable is allocated per session. Increasing will allow longer statements to be distinguished from each other, but increase memory use, while decreasing will reduce memory use, but more statements may become indistinguishable.
Command line:
--max-digest-length=#Scope: Global,
Dynamic: No
Data Type:
numericDefault Value:
1024Range:
0to1048576
max_error_count
max_error_countDescription: Specifies the maximum number of messages stored for display by SHOW ERRORS and SHOW WARNINGS statements.
Command line:
--max-error-count=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
64Range:
0to65535
max_heap_table_size
max_heap_table_sizeDescription: Maximum size in bytes for user-created MEMORY tables. Setting the variable while the server is active has no effect on existing tables unless they are recreated or altered. The smaller of max_heap_table_size and tmp_table_size also limits internal in-memory tables. When the maximum size is reached, any further attempts to insert data will receive a "table ... is full" error. Temporary tables created with CREATE TEMPORARY will not be converted to Aria, as occurs with internal temporary tables, but will also receive a table full error.
Command line:
--max-heap-table-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
16777216Range :
16384to4294966272
max_insert_delayed_threads
max_insert_delayed_threadsDescription: Synonym for max_delayed_threads.
max_join_size
max_join_sizeDescription: Statements will not be performed if they are likely to need to examine more than this number of rows, row combinations or do more disk seeks. Can prevent poorly-formatted queries from taking server resources. Changing this value to anything other the default will reset sql_big_selects to 0. If sql_big_selects is set again, max_join_size will be ignored. This limit is also ignored if the query result is sitting in the query cache. Previously named sql_max_join_size, which is still a synonym.
Command line:
--max-join-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
18446744073709551615Range:
1to18446744073709551615
max_length_for_sort_data
max_length_for_sort_dataDescription: Used to decide which algorithm to choose when sorting rows. If the total size of the column data, not including columns that are part of the sort, is less than
max_length_for_sort_data, then we add these to the sort key. This can speed up the sort as we don't have to re-read the same row again later. Setting the value too high can slow things down as there will be a higher disk activity for doing the sort.Command line:
--max-length-for-sort-data=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
1024Range:
4to8388608
max_long_data_size
max_long_data_sizeDescription: Maximum size for parameter values sent with mysql_stmt_send_long_data(). If not set, will default to the value of max_allowed_packet. Deprecated in MariaDB 5.5 and removed in MariaDB 10.5.0; use max_allowed_packet instead.
Command line:
--max-long-data-size=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
16777216(16M)Range:
1024to4294967295Deprecated: MariaDB 5.5
Removed: MariaDB 10.5.0
max_open_cursors
max_open_cursorsDescription: The maximum number of open cursors allowed per session.
Command line:
--max-open-cursors=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
50Range:
0to 65536Introduced: MariaDB 12.0
max_password_errors
max_password_errorsDescription: The maximum permitted number of failed connection attempts due to an invalid password before a user is blocked from further connections. FLUSH_PRIVILEGES will permit the user to connect again. This limit is not applicable for users with the SUPER privilege or, from MariaDB 10.5.2, the CONNECTION ADMIN privilege, with a hostname of localhost, 127.0.0.1 or ::1. See also the Information Schema USERS table.
Command line:
--max-password-errors=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
4294967295Range:
1to4294967295
max_prepared_stmt_count
max_prepared_stmt_countDescription: Maximum number of prepared statements on the server. Can help prevent certain forms of denial-of-service attacks. If set to
0, no prepared statements are permitted on the server.Command line:
--max-prepared-stmt-count=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
16382Range:
0to4294967295
max_recursive_iterations
max_recursive_iterationsDescription: Maximum number of iterations when executing recursive queries, used to prevent infinite loops in recursive CTEs.
Command line:
--max-recursive-iterations=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
1000(>= MariaDB 10.6.0),4294967295(<= MariaDB 10.5)Range:
0to4294967295
max_rowid_filter_size
max_rowid_filter_sizeDescription: The maximum size of the container of a rowid filter.
Command line:
--max-rowid-filter-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
131072Range:
1024to18446744073709551615
max_seeks_for_key
max_seeks_for_keyDescription: The optimizer assumes that the number specified here is the most key seeks required when searching with an index, regardless of the actual index cardinality. If this value is set lower than its default and maximum, indexes will tend to be preferred over table scans.
Command line:
--max-seeks-for-key=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
4294967295Range:
1to4294967295
max_session_mem_used
max_session_mem_usedDescription: Amount of memory a single user session is allowed to allocate. This limits the value of the session variable Memory_used.
Command line:
--max-session-mem-used=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
9223372036854775807(8192 PB)Range:
8192to18446744073709551615
max_sort_length
max_sort_lengthDescription: Maximum size in bytes used for sorting data values - anything exceeding this is ignored. The server uses only the first
max_sort_lengthbytes of each value and ignores the rest. Increasing this may require sort_buffer_size to be increased (especially if ER_OUT_OF_SORTMEMORY errors start appearing). From MariaDB 11.7, a warning is generated when max_sort_length is exceeded.Command line:
--max-sort-length=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
1024Range:
4to8388608(<= MariaDB 10.4.13, MariaDB 10.5.3)8to8388608(>= MariaDB 10.4.14, MariaDB 10.5.4)
max_sp_recursion_depth
max_sp_recursion_depthDescription: Permitted number of recursive calls for a stored procedure.
0, the default, no recursion is permitted. Increasing this value increases the thread stack requirements, so you may need to increase thread_stack as well. This limit doesn't apply to stored functions.Command line:
--max-sp-recursion-depth[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to255
max_statement_time
max_statement_timeDescription: Maximum time in seconds that a query can execute before being aborted. This includes all queries, not just SELECT statements, but excludes statements in stored procedures. If set to 0, no limit is applied. See Aborting statements that take longer than a certain time to execute for details and limitations. Useful when combined with SET STATEMENT for limiting the execution times of individual queries. Replicas are not affected by this variable, however, from MariaDB 10.10, there's slave_max_statement_time that sets the limit to abort queries on a replica.
Command line:
--max-statement-time[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0.000000Range:
0to31536000
max_tmp_tables
max_tmp_tablesDescription: Unused.
Removed: MariaDB 11.3.0
max_user_connections
max_user_connectionsDescription: Maximum simultaneous connections permitted for each user account. When set to
0, there is no per user limit. Setting it to-1stops users without the SUPER privilege or, from MariaDB 10.5.2, the CONNECTION ADMIN privilege, from connecting to the server. The session variable is always read-only and only privileged users can modify user limits. The session variable defaults to the globalmax_user_connectionsvariable, unless the user's specific MAX_USER_CONNECTIONS resource option is non-zero. When both global variable and the user resource option are set, the user's MAX_USER_CONNECTIONS is used. Note: This variable does not affect users with the SUPER privilege or, from MariaDB 10.5.2, the CONNECTION ADMIN privilege.Command line:
--max-user-connections=#Scope: Global, Session
Dynamic: Yes, (except when globally set to
0or-1)Data Type:
numericDefault Value:
0Range:
-1to4294967295
max_write_lock_count
max_write_lock_countCommand line:
--max-write-lock-count=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
4294967295Range:
1to4294967295
metadata_locks_cache_size
metadata_locks_cache_sizeDescription: Unused since 10.1.4
Command line:
--metadata-locks-cache-size=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
1024Range:
1to1048576
metadata_locks_hash_instances
metadata_locks_hash_instancesDescription: Unused since 10.1.4
Command line:
--metadata-locks-hash-instances=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
8Range:
1to1024
metadata_locks_instances
metadata_locks_instancesDescription: Number of fast lanes to create for metadata locks. Can be used to improve DML scalability by eliminating MDL_lock::rwlock load. Use 1 to disable MDL fast lanes. Supported MDL namespaces: BACKUP.
Command line:
--metadata-locks-instances=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
8Range:
1to256Introduced: MariaDB 12.1
min_examined_row_limit
min_examined_row_limitDescription: Don't write queries to slow query log that examine fewer rows than the set value. If set to
0, the default, no row limit is used. From MariaDB 10.11.0, this is an alias for log_slow_min_examined_row_limit.Command line:
--min-examined-row-limit=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0-4294967295
mrr_buffer_size
mrr_buffer_sizeDescription: Size of buffer to use when using multi-range read with range access. See Multi Range Read optimization for more information.
Command line:
--mrr-buffer-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
262144Range
8192to2147483647
multi_range_count
multi_range_countDescription: Ignored. Use mrr_buffer_size instead.
Command line:
--multi-range-count=#Default Value:
256Removed: MariaDB 10.5.1
mysql56_temporal_format
mysql56_temporal_formatDescription: If set (the default), MariaDB uses the MySQL 5.6 low level formats for TIME, DATETIME and TIMESTAMP instead of the MariaDB 5.3 version. The version MySQL introduced in 5.6 requires more storage, but potentially allows negative dates and has some advantages in replication. There should be no reason to revert to the old MariaDB 5.3 microsecond format. See also MDEV-10723.
Command line:
--mysql56-temporal-formatScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
ON
named_pipe
named_pipeDescription: On Windows systems, determines whether connections over named pipes are permitted.
Command line:
--named-pipeScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFF
net_buffer_length
net_buffer_lengthDescription: The starting size, in bytes, for the connection and thread buffers for each client thread. The size can grow to max_allowed_packet. This variable's session value is read-only. Can be set to the expected length of client statements if memory is a limitation.
Command line:
--net-buffer-length=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
16384Range:
1024to1048576
net_read_timeout
net_read_timeoutDescription: Time in seconds the server will wait for a client connection to send more data before aborting the read. See also net_write_timeout and slave_net_timeout
Command line:
--net-read-timeout=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
30Range:
1to31536000
net_retry_count
net_retry_countDescription: Permit this many retries before aborting when attempting to read or write on a communication port. On FreeBSD systems should be set higher as threads are sent internal interrupts..
Command line:
--net-retry-count=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
10Range:
1to4294967295
net_write_timeout
net_write_timeoutDescription: Time in seconds to wait on writing a block to a connection before aborting the write. See also net_read_timeout and slave_net_timeout.
Command line:
--net-write-timeout=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
60Range:
1upwards
note_verbosity
note_verbosityDescription: Verbosity level for note-warnings given to the user. Options are added in a comma-delimited string, except for
all, which sets all options. Be aware that if the old sql_notes variable is 0, one will not get any notes. Settingnote_verbosityto "" is the recommended way to disable notes.basicAll old notes.unusable_keysGive warnings for unusable keys for SELECT, DELETE and UPDATE.explainGive warnings for unusable keys for EXPLAIN.allEnables all above options. This has to be given alone.
Command line:
note-verbosity=value1[,value2...]Scope: Global, Session
Dynamic: Yes
Data Type:
enumerationDefault Value:
basic,explainValid Values:
basic,explain,unusable_keysorall.Introduced: MariaDB 10.6.16
old
oldDescription: Disabled by default, enabling it reverts index hints to those used before MySQL 5.1.17. Enabling may lead to replication errors. Deprecated and replaced by old_mode from MariaDB 10.9.
Command line:
--oldScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFFDeprecated: MariaDB 10.9
old_alter_table
old_alter_tableDescription: From MariaDB 10.3.7, an alias for alter_algorithm. Prior to that, if set to
1(0is default), MariaDB reverts to the non-optimized, pre-MySQL 5.1, method of processing ALTER TABLE statements. A temporary table is created, the data is copied over, and then the temporary table is renamed to the original.Command line:
--old-alter-tableScope: Global, Session
Dynamic: Yes
Data Type:
enumerated(>=MariaDB 10.3.7)Default Value: See alter_algorithm
Valid Values: See alter_algorithm for the full list.
Deprecated: MariaDB 10.3.7 (superceded by alter_algorithm)
Removed: MariaDB 11.2.0
old_mode
old_modeDescription: Used for getting MariaDB to emulate behavior from an old version of MySQL or MariaDB. See OLD Mode. Fully replaces the old variable from MariaDB 10.9. Non-default OLD_MODE options are by design deprecated and will eventually be removed.
Command line:
--old-modeScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
UTF8_IS_UTF8MB3(>= MariaDB 10.6)(empty string)(<= MariaDB 10.5)Valid Values: See OLD Mode for the full list.
old_passwords
old_passwordsDescription: If set to
1(0is default), MariaDB reverts to using the mysql_old_password authentication plugin by default for newly created users and passwords, instead of the mysql_native_password authentication plugin.Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
open_files_limit
open_files_limitDescription: The number of file descriptors available to MariaDB. If you are getting the
Too many open fileserror, then you should increase this limit. If set to 0, then MariaDB will calculate a limit based on the following:
MAX(max_connections*5, max_connections +table_open_cache*2)
MariaDB sets the limit with setrlimit. MariaDB cannot set this to exceed the hard limit imposed by the operating system. Therefore, you may also need to change the hard limit. There are a few ways to do so.
If you are using mariadbd_safe to start
mariadbd, then see the instructions at mariadbd_safe: Configuring the Open Files Limit.If you are using systemd to start
mariadbd, then see the instructions at systemd: Configuring the Open Files Limit.Otherwise, you can change the hard limit for the
mysqluser account by modifying /etc/security/limits.conf. See Configuring Linux for MariaDB: Configuring the Open Files Limit for more details.Command line:
--open-files-limit=countScope: Global
Dynamic: No
Data Type:
numericDefault Value: Autosized (see description)
Range:
0to4294967295
optimizer_extra_pruning_depth
optimizer_extra_pruning_depthDescription:If the optimizer needs to enumerate a join prefix of this size or larger, then it will try aggressively prune away the search space.
Command line:
--optimizer-extra-pruning-depth[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
8Range:
0to62Introduced: MariaDB 10.10.1
optimizer_join_limit_pref_ratio
Description:Controls the optimizer_join_limit_pref_ratio optimization.
Command line:
--optimizer-join-limit-pref-ratio[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
0(Disable)Range:
0to4294967295Introduced: MariaDB 10.6.20, MariaDB 10.11.10, MariaDB 11.2.6, MariaDB 11.4.4, MariaDB 11.6.2
optimizer_max_sel_arg_weight
optimizer_max_sel_arg_weightDescription: This is an actively enforced maximum effective SEL_ARG tree weight limit. A SEL_ARG weight is the number of effective "ranges" hanging off this root (that is, merged tree elements are "unmerged" to count the weight). During range analysis, looking for possible index merges, SEL_ARG graphs related to key ranges in query conditions are being processed. Graphs exceeding this limit will stop keys being 'and'ed and 'or'ed together to form a new larger SEL_ARG graph. After each 'and' or 'or' process, this maximum weight limit is enforced. It enforces this limit by pruning the key part being used. This key part pruning can be used to limit/disable index merge SEL_ARG graph construction on overly long query conditions.
Command line:
--optimizer-max-sel-arg-weight=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
32000Range:
0to18446744073709551615Introduced: MariaDB 10.5.9
optimizer_max_sel_args
optimizer_max_sel_argsDescription: The maximum number of SEL_ARG objects created when optimizing a range. If more objects would be needed, range scans will not be used by the optimizer.
Command line:
--optimizer-max-sel-args=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
16000Range:
0to4294967295Introduced: MariaDB 10.6.16, MariaDB 10.10.7, MariaDB 10.11.6, MariaDB 11.0.4, MariaDB 11.1.3
optimizer_prune_level
optimizer_prune_levelDescription:Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space.
0: heuristics are disabled and an exhaustive search is performed1: the optimizer will use heuristics to prune less-promising partial plans from the optimizer search space2: tables using EQ_REF will be joined together as 'one entity' and the different combinations of these tables will not be considered (from MariaDB 10.10)
Command line:
--optimizer-prune-level[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
2(>= MariaDB 10.10),1(<= MariaDB 10.9)
optimizer_search_depth
optimizer_search_depthDescription: Maximum search depth by the query optimizer. Smaller values lead to less time spent on execution plans, but potentially less optimal results. If set to
0, MariaDB will automatically choose a reasonable value. Since the better results from more optimal planning usually offset the longer time spent on planning, this is set as high as possible by default.63is a valid value, but its effects (switching to the original find_best search) are deprecated.Command line:
--optimizer-search-depth[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
62Range:
0to63
optimizer_selectivity_sampling_limit
optimizer_selectivity_sampling_limitDescription: Controls number of record samples to check condition selectivity. Only used if
[optimizer_use_condition_selectivity](server-system-variables.md#optimizer_use_condition_selectivity) > 4.Command line:
optimizer-selectivity-sampling-limit[=#]Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
100Range:
10upwards
optimizer_switch
optimizer_switchDescription: A series of flags for controlling the query optimizer. See Optimizer Switch for defaults, and a comparison to MySQL.
Command line:
--optimizer-switch=valueScope: Global, Session
Dynamic: Yes
Data Type:
stringValid Values:
condition_pushdown_for_derived={on|off}condition_pushdown_for_subquery={on|off}condition_pushdown_from_having={on|off}cset_narrowing={on|off}- see Charset Narrowing Optimization (>= MariaDB 10.6.16, MariaDB 10.11.6, MariaDB 11.0.4, MariaDB 11.1.3 and MariaDB 11.2.2)default- set all optimizations to their default values.derived_merge={on|off}- see Derived table merge optimizationderived_with_keys={on|off}- see Derived table with key optimizationduplicateweedout={on|off}. From MariaDB 12.0.engine_condition_pushdown={on|off}. Deprecated in MariaDB 10.1.1 as engine condition pushdown is now automatically enabled for all engines that support it.exists_to_in={on|off}- see EXISTS-to-IN optimizationextended_keys={on|off}- see Extended Keysfirstmatch={on|off}- see First Match Strategyhash_join_cardinality={on|off}- see hash_join_cardinality-optimizer_switch-flag (>= MariaDB 11.0.2, MariaDB 10.11.3, MariaDB 10.6.13)index_condition_pushdown={on|off}- see Index Condition Pushdownindex_merge={on|off}index_merge_intersection={on|off}index_merge_sort_intersection={on|off}- more detailsindex_merge_sort_union={on|off}index_merge_union={on|off}in_to_exists={on|off}- see IN-TO-EXISTS transformationjoin_cache_bka={on|off}- see Block-Based Join Algorithmsjoin_cache_hashed={on|off}- see Block-Based Join Algorithmsjoin_cache_incremental={on|off}- see Block-Based Join Algorithmsloosescan={on|off}- see LooseScan strategymaterialization={on|off}- Semi-join and non semi-join materialization.mrr={on|off}- see Multi Range Read optimizationmrr_cost_based={on|off}- see Multi Range Read optimizationmrr_sort_keys={on|off}- see Multi Range Read optimizationnot_null_range_scan={on|off}- see not_null_range_scan optimization ( >= MariaDB 10.5.0)optimize_join_buffer_size={on|off}- see Block-Based Join Algorithmsorderby_uses_equalities={on|off}- if not set, the optimizer ignores equality propagation. See MDEV-8989.outer_join_with_cache={on|off}- see Block-Based Join Algorithmspartial_match_rowid_merge={on|off}- see Non-semi-join subquery optimizationspartial_match_table_scan={on|off}- see Non-semi-join subquery optimizationsrowid_filter={on|off}- see Rowid Filtering Optimizationsargable_casefold={on|off}(>= MariaDB 11.3.0)semijoin={on|off}- see Semi-join subquery optimizationssemijoin_with_cache={on|off}- see Block-Based Join Algorithmssplit_materialized={on|off}subquery_cache={on|off}- see subquery cache.table_elimination={on|off}- see Table Elimination User Interface
optimizer_record_context
optimizer_record_contextDescription: Controls storing of optimizer context of all tables that are referenced in a query.
Command line:
--optimizer-record-context{=0|1}Scope: Global, Session
Dynamic: Yes
Data Type: boolean
Default Value:
OFFIntroduced: MariaDB 12.1
optimizer_trace
optimizer_traceDescription: Controls tracing of the optimizer: optimizer_trace=option=val[,option=val...], where option is one of {enabled} and val is one of {on, off, default}
Command line:
--optimizer-trace=valueScope: Global, Session
Dynamic: Yes
Data Type:
enumDefault Value:
enabled=offValid Values:
enabled={on|off|default}
optimizer_trace_max_mem_size
optimizer_trace_max_mem_sizeDescription: Limits the memory used while tracing a query by specifying the maximum allowed cumulated size, in bytes, of stored optimizer traces.
Command line:
--optimizer-trace-max-mem-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
1048576Range:
1to18446744073709551615
optimizer_use_condition_selectivity
optimizer_use_condition_selectivityDescription: Controls which statistics can be used by the optimizer when looking for the best query execution plan. In most cases, the default value,
4will be suitable. However, if you are hitting some of the rare cases where this does not work well (see MDEV-23707), you can usually work around this by setting this variable to1.1Use selectivity of predicates as in MariaDB 5.5.2Use selectivity of all range predicates supported by indexes.3Use selectivity of all range predicates estimated without histogram.4Use selectivity of all range predicates estimated with histogram.5Additionally use selectivity of certain non-range predicates calculated on record sample.
Command line:
--optimizer-use-condition-selectivity=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
4Range:
1to5
pid_file
pid_fileDescription: Full path of the process ID file. If --log-basename is also set,
pid_fileshould be placed after in the config files. Later settings override earlier settings, solog-basenamewill override any earlier log file name settings.Command line:
--pid-file=file_nameScope: Global
Dynamic: No
Data Type:
file name
plugin_dir
plugin_dirDescription: Path to the plugin directory. For security reasons, either make sure this directory can only be read by the server, or set secure_file_priv.
Command line:
--plugin-dir=pathScope: Global
Dynamic: No
Data Type:
directory nameDefault Value:
BASEDIR/lib/plugin
plugin_maturity
plugin_maturityDescription: The lowest acceptable plugin maturity. MariaDB will not load plugins less mature than the specified level.
Command line:
--plugin-maturity=levelScope: Global
Dynamic: No
Type: enum
Default Value: One less than the server maturity
Valid Values:
unknown,experimental,alpha,beta,gamma,stable
port
portDescription: Port to listen for TCP/IP connections. If set to
0, will default to, in order of preference, my.cnf, the MYSQL_TCP_PORT environment variable, /etc/services, built-in default (3306).Command line:
--port=#,-PScope: Global
Dynamic: No
Data Type:
numericDefault Value:
3306Range:
0to65535
preload_buffer_size
preload_buffer_sizeDescription: Size in bytes of the buffer allocated when indexes are preloaded.
Command line:
--preload-buffer-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
32768Range:
1024to1073741824
profiling
profilingDescription: If set to
1(0is default), statement profiling will be enabled. See SHOW PROFILES() and SHOW PROFILE().Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
profiling_history_size
profiling_history_sizeDescription: Number of statements about which profiling information is maintained. If set to
0, no profiles are stored. See SHOW PROFILES.Command line:
--profiling-history-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
15Range:
0to100
progress_report_time
progress_report_timeDescription: Time in seconds between sending progress reports to the client for time-consuming statements. If set to
0, progress reporting will be disabled.Command line:
--progress-report-time=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
5Range:
0to4294967295
protocol_version
protocol_versionDescription: The version of the client/server protocol used by the MariaDB server.
Command line: None
Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
10Range:
0to4294967295
proxy_protocol_networks
proxy_protocol_networksDescription: Enable proxy protocol for these source networks. The syntax is a comma separated list of IPv4 and IPv6 networks. If the network doesn't contain a mask, it is considered to be a single host. "*" represents all networks and must be the only directive on the line. String "localhost" represents non-TCP local connections (Unix domain socket, Windows named pipe or shared memory). See Proxy Protocol Support.
Command line:
--proxy-protocol-networks=valueScope: Global
Dynamic: Yes
Data Type:
stringDefault Value: (empty)
proxy_user
proxy_userDescription: Set to the proxy user account name if the current client is a proxy, else
NULL.Scope: Session
Dynamic: No
Data Type:
string
pseudo_slave_mode
pseudo_slave_modeDescription: For internal use by the server.
Scope: Session
Dynamic: Yes
Data Type:
numericDefault Value:
OFF
pseudo_thread_id
pseudo_thread_idDescription: For internal use only.
Scope: Session
Dynamic: Yes
Data Type:
numeric
query_alloc_block_size
query_alloc_block_sizeDescription: Size in bytes of the extra blocks allocated during query parsing and execution (after query_prealloc_size is used up).
Command line:
--query-alloc-block-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
BIGINT UNSIGNEDDefault Value:
>= MariaDB 11.4.5, MariaDB 10.11.11, MariaDB 10.6.22:
32768<= MariaDB 11.4.4, MariaDB 10.11.10, MariaDB 10.6.21:
16384
Range:
1024to4294967295Block size:
1024
query_cache_limit
query_cache_limitDescription: Size in bytes for which results larger than this are not stored in the query cache.
Command line:
--query-cache-limit=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
1048576(1MB)Range:
0to4294967295
query_cache_min_res_unit
query_cache_min_res_unitDescription: Minimum size in bytes of the blocks allocated for query cache results.
Command line:
--query-cache-min-res-unit=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
4096(4KB)Range - 32 bit:
1024to4294967295Range - 64 bit:
1024to18446744073709547520
query_cache_size
query_cache_sizeDescription: Size in bytes available to the query cache. About 40KB is needed for query cache structures, so setting a size lower than this will result in a warning.
0, the default before MariaDB 10.1.7, effectively disables the query cache.
Warning: Starting from MariaDB 10.1.7, query_cache_type is automatically set to ON if the server is started with the query_cache_size set to a non-zero (and non-default) value. This will happen even if query_cache_type is explicitly set to OFF in the configuration.
Command line:
--query-cache-size=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
1M(although frequently given a default value in some setups)Valid Values:
0upwards in units of 1024.
query_cache_strip_comments
query_cache_strip_commentsDescription: If set to
1(0is default), the server will strip any comments from the query before searching to see if it exists in the query cache. Multiple space, line feeds, tab and other white space characters will also be removed.Command line:
query-cache-strip-commentsScope: Session, Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
query_cache_type
query_cache_typeDescription: If set to
0, the query cache is disabled (although a buffer of query_cache_size bytes is still allocated). If set to1all SELECT queries will be cached unless SQL_NO_CACHE is specified. If set to2(orDEMAND), only queries with the SQL CACHE clause will be cached. Note that if the server is started with the query cache disabled, it cannot be enabled at runtime.
Warning: Starting from MariaDB 10.1.7, query_cache_type is automatically set to ON if the server is started with the query_cache_size set to a non-zero (and non-default) value. This will happen even if query_cache_type is explicitly set to OFF in the configuration.
Command line:
--query-cache-type=#Scope: Global, Session
Dynamic: Yes
Data Type:
enumerationDefault Value:
OFFValid Values:
0orOFF,1orON,2orDEMAND
query_cache_wlock_invalidate
query_cache_wlock_invalidateDescription: If set to
0, the default, results present in the query cache will be returned even if there's a write lock on the table. If set to1, the client will first have to wait for the lock to be released.Command line:
--query-cache-wlock-invalidateScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
query_prealloc_size
query_prealloc_sizeDescription: Size in bytes of the persistent buffer for query parsing and execution, allocated on connect and freed on disconnect. Increasing may be useful if complex queries are being run, as this will reduce the need for more memory allocations during query operation. See also query_alloc_block_size.
Command line:
--query-prealloc-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
>= MariaDB 11.4.5, MariaDB 10.11.11, MariaDB 10.6.22:
32768<= MariaDB 11.4.4, MariaDB 10.11.10, MariaDB 10.6.21:
24576
Range:
1024to4294967295
rand_seed1
rand_seed1Description:
rand_seed1andrand_seed2facilitate replication of the RAND() function. The master passes the value of these to the slaves so that the random number generator is seeded in the same way, and generates the same value, on the slave as on the master.Command line: None
Scope: Session
Dynamic: Yes
Data Type:
numericDefault Value: Varies
Range:
0to18446744073709551615
rand_seed2
rand_seed2Description: See rand_seed1.
range_alloc_block_size
range_alloc_block_sizeDescription: Size in bytes of blocks allocated during range optimization. The unit size in 1024.
Command line:
--range-alloc-block-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
4096Range - 32 bit:
4096to4294967295Range - 64 bit:
4096to18446744073709547520
read_buffer_size
read_buffer_sizeDescription: Each thread performing a sequential scan (for MyISAM, Aria and MERGE tables) allocates a buffer of this size in bytes for each table scanned. Increase if you perform many sequential scans. If not in a multiple of 4KB, will be rounded down to the nearest multiple. Also used in ORDER BY's for caching indexes in a temporary file (not temporary table), for caching results of nested queries, for bulk inserts into partitions, and to determine the memory block size of MEMORY tables.
Command line:
--read-buffer-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
131072Range:
8192to2147479552
read_only
read_onlyDescription: Do not allow changes to non-temporary tables. Options are:
OFF— changes allowed;ON— Disallow changes for users without theREAD ONLY ADMINprivilege;NO_LOCK— Additionally disallowsLOCK TABLESandSELECT ... IN SHARE MODE;NO_LOCK_NO_ADMIN— Disallows also for users withREAD_ONLY ADMINprivilege. Replication (slave) threads are not affected by this option.Command line:
--read-onlyScope: Global
Dynamic: Yes
Data Type:
enumDefault Value:
OFFValid values:
OFF,ON,NO_LOCK,NO_LOCK_NO_ADMIN
Description: When set to
1(0is default), no updates are permitted except from users with the SUPER privilege or, from MariaDB 10.5.2, the READ ONLY ADMIN privilege, or replica servers updating from a primary. Theread_onlyvariable is useful for replica servers to ensure no updates are accidentally made outside of what are performed on the primary. Inserting rows to log tables, updates to temporary tables and OPTIMIZE TABLE or ANALYZE TABLE statements are excluded from this limitation. Ifread_onlyis set to1, then the SET PASSWORD statement is limited only to users with the SUPER privilege (<= MariaDB 10.5.1) or READ ONLY ADMIN privilege (>= MariaDB 10.5.2). Attempting to set this variable to1will fail if the current session has table locks or transactions pending, while if other sessions hold table locks, the statement will wait until these locks are released before completing. While the attempt to setread_onlyis waiting, other requests for table locks or transactions will also wait untilread_onlyhas been set. See Read-Only Replicas for more. From MariaDB 10.5.2, the READ_ONLY ADMIN privilege will allow users granted that privilege to perform writes, even if theread_onlyvariable is set. In earlier versions, and until MariaDB 10.11.0, users with the SUPER can perform writes while this variable is set.Command line:
--read-onlyScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
read_rnd_buffer_size
read_rnd_buffer_sizeDescription: Size in bytes of the buffer used when reading rows from a MyISAM table in sorted order after a key sort. Larger values improve ORDER BY performance, although rather increase the size by SESSION where the need arises to avoid excessive memory use.
Command line:
--read-rnd-buffer-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
262144Range:
8200to2147483647
redirect_url
redirect_urlDescription: URL of another server to redirect clients to. Format should be
{mysql,mariadb}://host [:port]. Empty string means no redirection. For exampleset global redirect_url="mysql://mariadb.org:12345". See Connection Redirection Mechanism in the MariaDB Client/Server Protocol.Command line:
--redirect_url=valScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value: Empty
Introduced: MariaDB 11.3.0
require_secure_transport
require_secure_transportDescription: When this option is enabled, connections attempted using insecure transport will be rejected. Secure transports are SSL/TLS, Unix sockets or named pipes. Note that per-account requirements take precedence.
Command line:
--require-secure-transport[={0|1}]Scope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFFIntroduced: MariaDB 10.5.2
rowid_merge_buff_size
rowid_merge_buff_sizeDescription: The maximum size in bytes of the memory available to the Rowid-merge strategy. See Non-semi-join subquery optimizations for more information.
Command line:
--rowid-merge-buff-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
8388608Range:
0to2147483647
rpl_recovery_rank
rpl_recovery_rankDescription: Unused.
Removed: MariaDB 10.1.2
safe_show_database
safe_show_databaseDescription: This variable was removed in MariaDB 5.5, and has been replaced by the more flexible SHOW DATABASES privilege.
Command line:
--safe-show-database(until MySQL 4.1.1)Scope: Global
Dynamic: Yes
Data Type:
booleanRemoved: MariaDB 5.5
secure_auth
secure_authDescription: Connections will be blocked if they use the mysql_old_password authentication plugin. The server will also fail to start if the privilege tables are in the old, pre-MySQL 4.1 format.
secure_auth=0was deprecated in MariaDB 10.6.17, MariaDB 10.11.7, MariaDB 11.0.5, MariaDB 11.1.4, MariaDB 11.2.3.Command line:
--secure-authScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
ON
secure_file_priv
secure_file_privDescription: LOAD DATA, SELECT ... INTO and LOAD FILE() will only work with files in the specified path. If not set, the default, or set to empty string, the statements will work with any files that can be accessed.
Command line:
--secure-file-priv=pathScope: Global
Dynamic: No
Data Type:
path nameDefault Value: None
secure_timestamp
secure_timestampDescription: Restricts direct setting of a session timestamp. Possible levels are:
YES - timestamp cannot deviate from the system clock. Intended to prevent tampering with system versioning history. Should not be used on replicas, as when a value based on the timestamp is inserted in statement mode, discrepancies can occur.
REPLICATION - replication thread can adjust timestamp to match the primary's
SUPER - a user with this privilege and a replication thread can adjust timestamp
NO - historical behavior, anyone can modify session timestamp
Command line:
--secure-timestamp=valueScope: Global
Dynamic: No
Data Type:
enumDefault Value:
NO
server_uid
server_uidDescription: Automatically calculated server unique id hash. Added to the error log to allow one to verify if error reports are from the same server. UID is a base64-encoded SHA1 hash of the MAC address of one of the interfaces, and the tcp port that the server is listening on.
Command line: None
Scope: Global
Dynamic: No
Data Type:
varcharDefault Value: None
session_track_schema
session_track_schemaDescription: Whether to track changes to the default schema within the current session.
Command line:
--session-track-schema={0|1}Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
ON
session_track_state_change
session_track_state_changeDescription: Whether to track changes to the session state.
Command line:
--session-track-state-change={0|1}Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
session_track_system_variables
session_track_system_variablesDescription: Comma-separated list of session system variables for which to track changes. For compatibility with MySQL defaults, this variable should be set to "autocommit, character_set_client, character_set_connection, character_set_results, time_zone". The
*character tracks all session variables.Command line:
--session-track-system-variables=valueScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
= MariaDB 11.3:
autocommit,character_set_client,character_set_connection,character_set_results,redirect_url,time_zone<= MariaDB 11.2:
autocommit, character_set_client, character_set_connection, character_set_results, time_zone
session_track_transaction_info
session_track_transaction_infoDescription: Track changes to the transaction attributes. OFF to disable; STATE to track just transaction state (Is there an active transaction? Does it have any data? etc.); CHARACTERISTICS to track transaction state and report all statements needed to start a transaction with the same characteristics (isolation level, read only/read write,snapshot - but not any work done / data modified within the transaction).
Command line:
--session-track-transaction-info=valueScope: Global, Session
Dynamic: Yes
Data Type:
enumDefault Value:
OFFValid Values:
OFF,STATE,CHARACTERISTICS
shared_memory
shared_memoryDescription: Windows only, determines whether the server permits shared memory connections. See also shared_memory_base_name.
Scope: Global
Dynamic: No
shared_memory_base_name
shared_memory_base_nameDescription: Windows only, specifies the name of the shared memory to use for shared memory connection. Mainly used when running more than one instance on the same physical machine. By default the name is
MYSQLand is case sensitive. See also shared_memory.Scope: Global
Dynamic: No
Data Type:
stringDefault Value:
MYSQL
shutdown_wait_for_slaves
shutdown_wait_for_slavesDescription: When
ON, SHUTDOWNcommand runs with implicitWAIT FOR ALL SLAVESoption. That is, when runningSHUTDOWN, before killing the binary log dump threads, the server will first kill all client threads and send all binary log events to all connected replicas.Scope: Global
Dynamic: No
Data Type:
BooleanDefault Value:
OFF
skip_external_locking
skip_external_lockingDescription: If this system variable is set, then some kinds of external table locks will be disabled for some storage engines.
If this system variable is set, then the MyISAM storage engine will not use file-based locks. Otherwise, it will use the fcntl() function with the
F_SETLKoption to get file-based locks on Unix, and it will use the LockFileEx() function to get file-based locks on Windows.If this system variable is set, then the Aria storage engine will not lock a table when it decrements the table's in-file counter that keeps track of how many connections currently have the table open. See MDEV-19393 for more information.
Note that command line option name is the opposite of the variable name, and the value is the opposite too.
--external-locking=1means@@skip_external_locking=0, and vice versa.
Command line:
--external-lockingScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
1(for the variable, that is0for the command line option)
skip_grant_tables
skip_grant_tablesDescription: Start without grant tables. This gives all users FULL ACCESS to all tables. Before MariaDB 10.10, available as an option only. Use mariadb-admin flush-privileges, mariadb-admin reload or FLUSH PRIVILEGES to resume using the grant tables.
Command line:
--skip-grant-tablesScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFFIntroduced: MariaDB 10.10
skip_name_resolve
skip_name_resolveDescription: If set to
ON(OFFis the default), only IP addresses are used for connections. Host names are not resolved. All host values in the GRANT tables must be IP addresses (or localhost). Some container configs explicitly setskip_name_resolvetoON, rather than leave it as the default,OFF.Command line:
--skip-name-resolveScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
OFF
skip_networking
skip_networkingDescription: If set to 1, (0 is the default), the server does not listen for TCP/IP connections. All interaction with the server will be through socket files (Unix) or named pipes or shared memory (Windows). It's recommended to use this option if only local clients are permitted to connect to the server.
Command line:
--skip-networkingScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
0
skip_show_database
skip_show_databaseDescription: If set to 1, (0 is the default), only users with the SHOW DATABASES privilege can use the SHOW DATABASES statement to see all database names.
Command line:
--skip-show-databaseScope: Global
Dynamic: No
Data Type:
booleanDefault Value:
0
slow_launch_time
slow_launch_timeDescription: Time in seconds. If a thread takes longer than this to launch, the
slow_launch_threadsserver status variable is incremented.Command line:
--slow-launch-time=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
2
slow_query_log
slow_query_logDescription: If set to 0, the default unless the --slow-query-log option is used, the slow query log is disabled, while if set to 1 (both global and session variables), the slow query log is enabled. From MariaDB 10.11.0, an alias for log_slow_query.
Command line:
--slow-query-logScope: Global, Session
Dynamic: Yes
Data Type:
booleanData Type:
booleanDefault Value:
0See also: See log_output to see how log files are written. If that variable is set to
NONE, no logs will be written even if slow_query_log is set to1.
slow_query_log_file
slow_query_log_fileDescription: Name of the slow query log file. From MariaDB 10.11, an alias for log_slow_query_file. If --log-basename is also set,
slow_query_log_fileshould be placed after in the config files. Later settings override earlier settings, solog-basenamewill override any earlier log file name settings.Command line:
--slow-query-log-file=file_nameScope: Global
Dynamic: Yes
Data Type:
file nameDefault Value:
host_name-slow.log
socket
socketDescription: On Unix-like systems, this is the name of the socket file used for local client connections, by default
/tmp/mysql.sock, often changed by the distribution, for example/var/lib/mysql/mysql.sock. On Windows, this is the name of the named pipe used for local client connections, by defaultMySQL. On Windows, this is not case-sensitive.Command line:
--socket=nameScope: Global
Dynamic: No
Data Type:
file nameDefault Value:
/tmp/mysql.sock(Unix),MySQL(Windows)
sort_buffer_size
sort_buffer_sizeDescription: Each session performing a sort allocates a buffer with this amount of memory. Not specific to any storage engine. If the status variable sort_merge_passes is too high, you may need to look at improving your query indexes, or increasing this. Consider reducing where there are many small sorts, such as OLTP, and increasing where needed by session. 16k is a suggested minimum.
Command line:
--sort-buffer-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numberDefault Value:
2M (2097152)(some distributions increase the default)
sql_auto_is_null
sql_auto_is_nullDescription: If set to 1, the query
SELECT * FROM table_name WHERE auto_increment_column IS NULLwill return an auto-increment that has just been successfully inserted, the same as the LAST_INSERT_ID() function. Some ODBC programs make use of this IS NULL comparison.Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0
sql_big_selects
sql_big_selectsDescription: If set to 0, MariaDB will not perform large SELECTs. See max_join_size for details. If max_join_size is set to anything but DEFAULT, sql_big_selects is automatically set to 0. If sql_big_selects is again set, max_join_size will be ignored.
Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
1
sql_big_tables
sql_big_tablesDescription: Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically.
This is a synonym for big_tables.
Command line:
--sql-big-tablesScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0Removed: MariaDB 10.0
sql_buffer_result
sql_buffer_resultDescription: If set to 1 (0 is default), results from SELECT statements are always placed into temporary tables. This can help the server when it takes a long time to send the results to the client by allowing the table locks to be freed early.
Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0
sql_if_exists
sql_if_existsDescription: If set to 1, adds an implicit IF EXISTS to ALTER, RENAME and DROP of TABLES, VIEWS, FUNCTIONS and PACKAGES. This variable is mainly used in replication to tag DDLs that can be ignored on the slave if the target table doesn't exist.
Command line:
--sql-if-exists[={0|1}]Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFFIntroduced: MariaDB 10.5.2
sql_log_off
sql_log_offDescription: If set to 1 (0 is the default), no logging to the general query log is done for the client. Only clients with the SUPER privilege can update this variable.
Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0
sql_log_update
sql_log_updateDescription: Removed. Use sql_log_bin instead.
Removed: MariaDB/MySQL 5.5
sql_low_priority_updates
sql_low_priority_updatesDescription: If set to 1 (0 is the default), for storage engines that use only table-level locking (Aria, MyISAM, MEMORY and MERGE), all INSERTs, UPDATEs, DELETEs and LOCK TABLE WRITEs will wait until there are no more SELECTs or LOCK TABLE READs pending on the relevant tables. Set this to 1 if reads are prioritized over writes.
This is a synonym for low_priority_updates.
Command line:
--sql-low-priority-updatesScope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
0Removed: MariaDB 10.0
sql_max_join_size
sql_max_join_sizeDescription: Synonym for max_join_size, the preferred name.
Deprecated: MariaDB 5.5
Removed: MariaDB 10.0
sql_mode
sql_modeDescription: Sets the SQL Mode. Multiple modes can be set, separated by a comma.
Command line:
--sql-mode=value[,value[,value...]]Scope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Valid Values: See SQL Mode for the full list.
sql_notes
sql_notesDescription: If set to 1, the default, warning_count is incremented each time a Note warning is encountered. If set to 0, Note warnings are not recorded. mariadb-dump has outputs to set this variable to 0 so that no unnecessary increments occur when data is reloaded. See also note_verbosity, which defines which notes should be given. The recommended way, as of MariaDB 10.6.16, to disable notes is to set
note_verbosityto "".Command line: None
Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
1
sql_quote_show_create
sql_quote_show_createDescription: If set to 1, the default, the server will quote identifiers for SHOW CREATE DATABASE, SHOW CREATE TABLE and SHOW CREATE VIEW statements. Quoting is disabled if set to 0. Enable to ensure replication works when identifiers require quoting.
Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
1
sql_safe_updates
sql_safe_updatesDescription: If set to 1, UPDATEs and DELETEs must be executed by using an index (simply mentioning an indexed column in a WHERE clause is not enough, optimizer must actually use it) or they must mention an indexed column and specify a LIMIT clause. Otherwise a statement will be aborted. Prevents the common mistake of accidentally deleting or updating every row in a table. Until MariaDB 10.3.11, could not be set as a command-line option or in my.cnf.
Command line:
--sql-safe-updates[={0|1}]Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF
sql_select_limit
sql_select_limitDescription: Maximum number of rows that can be returned from a SELECT query. Default is the maximum number of rows permitted per table by the server, usually 232-1 or 264-1. Can be restored to the default value after being changed by assigning it a value of DEFAULT. If a SELECT has a LIMIT clause, the LIMIT takes precedence over the value of the variable.
Command line: None
Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
18446744073709551615
sql_warnings
sql_warningsDescription: If set to 1, single-row INSERTs will produce a string containing warning information if a warning occurs.
Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
OFF (0)
storage_engine
storage_engineDescription: See default_storage_engine.
Deprecated: MariaDB 5.5
Remove: MariaDB 12.0
standard_compliant_cte
standard_compliant_cteDescription: Allow only standard-compliant common table expressions. Prior to MariaDB 10.2.4, this variable was named
standards_compliant_cte.Command line:
--standard-compliant-cte={0|1}Scope: Global, Session
Dynamic: Yes
Data Type:
booleanDefault Value:
ON
stored_program_cache
stored_program_cacheDescription: Limit to the number of stored routines held in the stored procedures and stored functions caches. Each time a stored routine is executed, this limit is first checked, and if the number held in the cache exceeds this, that cache is flushed and memory freed.
Command line:
--stored-program-cache=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
256Range:
256to524288
strict_password_validation
strict_password_validationDescription: When password validation plugins are enabled, reject passwords that cannot be validated (passwords specified as a hash). This excludes direct updates to the privilege tables.
Command line:
--strict-password-validationScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
ON
sync_frm
sync_frmDescription: If set to 1, the default, each time a non-temporary table is created, its .frm definition file is synced to disk. Fractionally slower, but safer in case of a crash.
Command line:
--sync-frmScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
TRUE
system_time_zone
system_time_zoneDescription: The system time zone is determined when the server starts. The system time zone is usually read from the operating system's environment but can be overridden by setting the 'TZ' environment variable before starting the server. See Time Zones: System Time Zone for the various ways to change the system time zone. This variable is not the same as the time_zone system variable, which is the variable that actually controls a session's active time zone. The system time zone is used for a session when
time_zoneis set to the special valueSYSTEM.Scope: Global
Dynamic: No
Data Type:
string
table_definition_cache
table_definition_cacheDescription: Number of table definitions that can be cached. Table definitions are taken from the .frm files, and if there are a large number of tables increasing the cache size can speed up table opening. Unlike the table_open_cache, as the table_definition_cache doesn't use file descriptors, and is much smaller.
Command line:
--table-definition-cache=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
400Range:
400to2097152
table_lock_wait_timeout
table_lock_wait_timeoutDescription: Unused, and removed.
Command line:
--table-lock-wait-timeout=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
50Range:
1to1073741824Removed: MariaDB 5.5
table_open_cache
table_open_cacheDescription: Maximum number of open tables cached in one table cache instance. See Optimizing table_open_cache for suggestions on optimizing. Increasing table_open_cache increases the number of file descriptors required.
Command line:
--table-open-cache=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
2000Range:
1to1048576(1024K)
table_open_cache_instances
table_open_cache_instancesDescription: This system variable specifies the maximum number of table cache instances. MariaDB Server initially creates just a single instance. However, whenever it detects contention on the existing instances, it will automatically create a new instance. When the number of instances has been increased due to contention, it does not decrease again. The default value of this system variable is
8, which is expected to handle up to 100 CPU cores. If your system is larger than this, then you may benefit from increasing the value of this system variable.Depending on the ratio of actual available file handles, and table_open_cache size, the max. instance count may be auto adjusted to a lower value on server startup.
The implementation and behavior of this feature is different than the same feature in MySQL 5.6.
See Optimizing table_open_cache: Automatic Creation of New Table Open Cache Instances for more information.
Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
8(>= MariaDB 10.2.2)Range:
1to64
table_type
table_typeDescription: Removed and replaced by storage_engine. Use default_storage_engine instead.
tcp_keepalive_interval
tcp_keepalive_intervalDescription: The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received. If set to 0, the system dependent default is used.
Command line:
--tcp-keepalive-interval=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to2147483
tcp_keepalive_probes
tcp_keepalive_probesDescription: The number of unacknowledged probes to send before considering the connection dead and notifying the application layer. If set to 0, a system dependent default is used.
Command line:
--tcp-keepalive-probes=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to2147483
tcp_keepalive_time
tcp_keepalive_timeDescription: Timeout, in seconds, with no activity until the first TCP keep-alive packet is sent. If set to 0, a system dependent default is used.
Command line:
--tcp-keepalive-time=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
0Range:
0to2147483
tcp_nodelay
tcp_nodelayDescription: Set the TCP_NODELAY option (disable Nagle's algorithm) on socket.
Command line:
--tcp-nodelay={0|1}Scope: Session
Dynamic: Yes
Data Type:
booleanDefault Value:
1
thread_cache_size
thread_cache_sizeDescription: Number of threads server caches for re-use. If this limit hasn't been reached, when a client disconnects, its threads are put into the cache, and re-used where possible. In MariaDB 10.MariaDB 5.5 and newer the threads are freed after 5 minutes of idle time. Normally this setting has little effect, as the other aspects of the thread implementation are more important, but increasing it can help servers with high volumes of connections per second so that most can use a cached, rather than a new, thread. The cache miss rate can be calculated as the server status variables threads_created/connections. If the thread pool is active,
thread_cache_sizeis ignored. Ifthread_cache_sizeis set to greater than the value of max_connections,thread_cache_sizewill be set to the max_connections value.Command line:
--thread-cache-size=#Scope: Global
Dynamic: Yes
Data Type:
numericDefault Value:
256(adjusted if thread pool is active)Range:
0to16384
thread_concurrency
thread_concurrencyDescription: Allows applications to give the system a hint about the desired number of threads. Specific to Solaris only, invokes thr_setconcurrency(). Deprecated and has no effect from MariaDB 5.5.
Command line:
--thread-concurrency=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
10Range:
1to512Deprecated: MariaDB 5.5
Removed: MariaDB 10.5.1
thread_stack
thread_stackDescription: Stack size for each thread. If set too small, limits recursion depth of stored procedures and complexity of SQL statements the server can handle in memory. Also affects limits in the crash-me test.
Command line:
--thread-stack=#Scope: Global
Dynamic: No
Data Type:
numericDefault Value:
299008
Range:
131072to18446744073709551615
time_format
time_formatDescription: Unused.
Removed: MariaDB 11.3.0
time_zone
time_zoneDescription: The global value determines the default time zone for sessions that connect. The session value determines the session's active time zone. When it is set to
SYSTEM, the session's time zone is determined by the system_time_zone system variable.Command line:
--default-time-zone=stringScope: Global, Session
Dynamic: Yes
Data Type:
stringDefault Value:
SYSTEM
timed_mutexes
timed_mutexesDescription: Determines whether InnoDB mutexes are timed.
OFF, the default, disables mutex timing, whileONenables it. See also SHOW ENGINE for more on mutex statistics. Deprecated and has no effect.Command line:
--timed-mutexesScope: Global
Dynamic: Yes
Data Type:
booleanDefault Value:
OFFDeprecated: MariaDB 5.5.39
Removed: MariaDB 10.5.1
timestamp
timestampDescription: Sets the time for the client. This will affect the result returned by the NOW() function, not the SYSDATE() function, unless the server is started with the --sysdate-is-now option, in which case SYSDATE becomes an alias of NOW, and will also be affected. Also used to get the original timestamp when restoring rows from the binary log.
Scope: Session
Dynamic: Yes
Valid Values:
timestamp_value(Unix epoch timestamp, not MariaDB timestamp),DEFAULT
tmp_disk_table_size
tmp_disk_table_sizeDescription: Max size for data for an internal temporary on-disk MyISAM or Aria table. These tables are created as part of complex queries when the result doesn't fit into the memory engine. You can set this variable if you want to limit the size of temporary tables created in your temporary directory tmpdir.
Command line:
--tmp-disk-table-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
18446744073709551615(max unsigned integer, no limit)Range:
1024to18446744073709551615
tmp_memory_table_size
tmp_memory_table_sizeDescription: An alias for tmp_table_size.
Command line:
--tmp-memory-table-size=#
tmp_table_size
tmp_table_sizeDescription: The largest size for temporary tables in memory (not MEMORY tables) although if max_heap_table_size is smaller the lower limit will apply. You can see if it's necessary to increase by comparing the status variables
Created_tmp_disk_tablesandCreated_tmp_tablesto see how many temporary tables out of the total created needed to be converted to disk. Often complex GROUP BY queries are responsible for exceeding the limit. Defaults may be different on some systems, see for example Differences in MariaDB in Debian. From MariaDB 10.2.7, tmp_memory_table_size is an alias.Command line:
--tmp-table-size=#Scope: Global, Session
Dynamic: Yes
Data Type:
numericDefault Value:
16777216(16MB)Range:
1024to4294967295(< MariaDB 10.5)0to4294967295(>= MariaDB 10.5.0)
tmpdir
tmpdirDescription: Directory for storing temporary tables and files. Can specify a list (separated by semicolons in Windows, and colons in Unix) that will then be used in round-robin fashion. This can be used for load balancing across several disks. Note that if the server is a replication replica, and slave_load_tmpdir, which overrides
tmpdirfor replicas, is not set, you should not settmpdirto a directory that is cleared when the machine restarts, or else replication may fail.Command line:
--tmpdir=pathor-t pathScope: Global
Dynamic: No
Type: directory name/s
Default:
$TMPDIR(environment variable) if setotherwise
$TEMPif set and on Windowsotherwise
$TMPif set and on Windowsotherwise
P_tmpdir("/tmp") orC:\TEMP(unless overridden during buid time)
transaction_alloc_block_size
transaction_alloc_block_sizeDescription: Size in bytes to increase the memory pool available to each transaction when the available pool is not large enough. See transaction_prealloc_size.
Command line:
--transaction-alloc-block-size=#Scope: Global, Session
Dynamic: Yes
Type: numeric
Default Value:
8192Range:
1024to134217728(128M)Block Size:
1024
transaction_isolation
transaction_isolationDescription: The transaction isolation level. See also SET TRANSACTION ISOLATION LEVEL. Introduced in MariaDB 11.1.1 to replace the tx_isolation system variable and align the option and the system variable name.
Command line:
--transaction-isolation=nameScope: Global, Session
Dynamic: Yes
Type: enumeration
Default Value:
REPEATABLE-READValid Values:
READ-UNCOMMITTED,READ-COMMITTED,REPEATABLE-READ,SERIALIZABLEIntroduced: MariaDB 11.1.1
transaction_prealloc_size
transaction_prealloc_sizeDescription: Initial size of a memory pool available to each transaction for various memory allocations. If the memory pool is not large enough for an allocation, it is increased by transaction_alloc_block_size bytes, and truncated back to transaction_prealloc_size bytes when the transaction is completed. If set large enough to contain all statements in a transaction, extra malloc() calls are avoided.
Command line:
--transaction-prealloc-size=#Scope: Global, Session
Dynamic: Yes
Type: numeric
Default Value:
4096Range:
1024to134217728(128M)Block Size:
1024
transaction_read_only
transaction_read_onlyDescription: Default transaction access mode. If set to
OFF, the default, access is read/write. If set toON, access is read-only. TheSET TRANSACTIONstatement can also change the value of this variable. See SET TRANSACTION and START TRANSACTION.Command line: None
Scope: Global, Session
Dynamic: Yes
Type: boolean
Default Value:
OFFIntroduced: MariaDB 11.1
tx_isolation
tx_isolationDescription: The transaction isolation level. Setting this session variable via
set @@tx_isolation=will take effect for only the subsequent transaction in the current session, much like SET TRANSACTION ISOLATION LEVEL. To set for a session, useSET SESSION tx_isolationorSET @@session.tx_isolation. See MDEV-31751. See also SET TRANSACTION ISOLATION LEVEL. In MariaDB 11.1, this system variable is deprecated and replaced by transaction_isolation.Command line:
--transaction-isolation=nameScope: Global, Session
Dynamic: Yes
Type: enumeration
Default Value:
REPEATABLE-READValid Values:
READ-UNCOMMITTED,READ-COMMITTED,REPEATABLE-READ,SERIALIZABLEDeprecated: MariaDB 11.1
tx_read_only
tx_read_onlyDescription: Default transaction access mode. If set to
OFF, the default, access is read/write. If set toON, access is read-only. TheSET TRANSACTIONstatement can also change the value of this variable. See SET TRANSACTION and START TRANSACTION. In MariaDB 11.1, this system variable is deprecated and replaced by transaction_read_only.Command line:
--transaction-read-only=#Scope: Global, Session
Dynamic: Yes
Type: boolean
Default Value:
OFFDeprecated: MariaDB 11.1
unique_checks
unique_checksDescription: If set to 0, storage engines can (but are not required to) assume that duplicate keys are not present in input data. If set to 0, inserting duplicates into a
UNIQUEindex can succeed, causing the table to become corrupted. Set to 0 to speed up imports of large tables to InnoDB.Scope: Global, Session
Dynamic: Yes
Type: boolean
Default Value:
1
updatable_views_with_limit
updatable_views_with_limitDescription: Determines whether view updates can be made with an UPDATE or DELETE statement with a LIMIT clause if the view does not contain all primary or not null unique key columns from the underlying table.
0prohibits this, while1permits it while issuing a warning (the default).Command line:
--updatable-views-with-limit=#Scope: Global, Session
Dynamic: Yes
Type: boolean
Default Value:
1
use_stat_tables
use_stat_tablesDescription: Controls the use of engine-independent table statistics.
never: The optimizer will not use data from statistics tables.complementary: The optimizer uses data from statistics tables if the same kind of data is not provided by the storage engine.preferably: Prefer the data from statistics tables, if it's not available there, use the data from the storage engine.complementary_for_queries: Same ascomplementary, but for queries only (to avoid needlessly collecting for ANALYZE TABLE).preferably_for_queries: Same aspreferably, but for queries only (to avoid needlessly collecting for ANALYZE TABLE).
Command line:
--use-stat-tables=modeScope: Global, Session
Dynamic: Yes
Data Type:
enumDefault Value:
preferably_for_queries
version
versionDescription: Server version number. It may also include a suffix with configuration or build information.
-debugindicates debugging support was enabled on the server, and-logindicates at least one of the binary log, general log or slow query log are enabled, for example10.0.1-MariaDB-mariadb1precise-log. Can be set at startup in order to fake the server version.Command line:
-V,--version[=name]Scope: Global
Dynamic: No
Type: string
version_comment
version_commentDescription: Value of the COMPILATION_COMMENT option specified by CMake when building MariaDB, for example
mariadb.org binary distribution.Scope: Global
Dynamic: No
Type: string
version_compile_machine
version_compile_machineDescription: The machine type or architecture MariaDB was built on, for example
i686.Scope: Global
Dynamic: No
Type: string
version_compile_os
version_compile_osDescription: Operating system that MariaDB was built on, for example
debian-linux-gnu.Scope: Global
Dynamic: No
Type: string
version_malloc_library
version_malloc_libraryDescription: Version of the used malloc library.
Command line: None
Scope: Global
Dynamic: No
Type: string
version_source_revision
version_source_revisionDescription: Source control revision id for MariaDB source code, enabling one to see exactly which version of the source was used for a build.
Command line: None
Scope: Global
Dynamic: No
Type: string
wait_timeout
wait_timeoutDescription: Time in seconds that the server waits for a connection to become active before closing it. The session value is initialized when a thread starts up from either the global value, if the connection is non-interactive, or from the interactive_timeout value, if the connection is interactive.
Command line:
--wait-timeout=#Scope: Global, Session
Dynamic: Yes
Type: numeric
Default Value:
28800Range: (Windows):
1to2147483Range: (Other):
1to31536000
warning_count
warning_countDescription: Read-only variable indicating the number of warnings, errors and notes resulting from the most recent statement that generated messages. See SHOW WARNINGS for more. Note warnings will only be recorded if sql_notes is true (the default).
Scope: Session
Dynamic: No
Type: numeric
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?

