Reputation: 166156
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.
Upvotes: 4
Views: 9416
Reputation: 3035
is the keybufsize in bit 8388608 equal to 1MegaByte,what the difference between @@key_buffer_size and @@innodb_buffer_pool_size
Upvotes: 0
Reputation: 270747
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.
Upvotes: 14