Skip to content

mariadb: change some options without restart  #19

@ip1981

Description

@ip1981

Changing some options without restart can be done in this way:

  1. Mark dynamic options as such (from MariaDB docs).
  2. Put them into separate file, link that file to something like /etc/mariadb.cnf, instead of the global file.
  3. Include that file in the global file.
  4. Make a service which applies dynamic option changes to running MariaDB.
  5. When MariaDB restarts, it will get all options from the global file and from /etc/mariadb.cnf.

For MariaDB >= 10.1:

SELECT LOWER(VARIABLE_NAME)
FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES
WHERE READ_ONLY = 'NO'
AND VARIABLE_SCOPE != 'SESSION ONLY'
ORDER BY VARIABLE_NAME;

To Nix list:

SET group_concat_max_len = 10000;
SELECT GROUP_CONCAT(
  CONCAT('"', LOWER(VARIABLE_NAME), '"')
  ORDER BY VARIABLE_NAME SEPARATOR ' '
) FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES
WHERE READ_ONLY = 'NO'
AND VARIABLE_SCOPE != 'SESSION ONLY'\G

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions