Is it possible to programmatically (via. the SQL interface, a CLI tool, etc) check the values of options that are normally set in a MySQL server's my.cnf
file?
I have a suspicion that the server I'm using is reading the incorrect configuration file, and I'd like to be able to check what the values are actually set to.
You can access them via SELECT
statements since they are exposed 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 whatever.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With