Programmatically check MySQL parameter values ​​(key_buffer_size, innodb_buffer_pool_size, etc.)

Is it possible to programmatically (through the SQL interface, CLI tool, etc.) check the values ​​of the parameters that are usually set in the my.cnf MySQL server my.cnf ?

I have a suspicion that the server I'm using is reading the wrong configuration file, and I would like to be able to check what the values ​​are really set to.

+4
source share
2 answers

You can access them using SELECT , as they are displayed as global system variables.

 SELECT @@key_buffer_size; SELECT @@innodb_buffer_pool_size; -- With a column alias you can use when fetching an associative array in PHP mysql> SELECT @@key_buffer_size as keybufsize; +------------+ | keybufsize | +------------+ | 8388608 | +------------+ 

You can obviously do this via PHP or the CLI or something else.

+14
source

- keybufsize in bit 8388608, equal to 1MegaByte, what is the difference between @@ key_buffer_size and @@ innodb_buffer_pool_size

0
source

Source: https://habr.com/ru/post/1379230/


All Articles