As you may already know, there are many different places where a MySQL configuration variables can be initialized.
In MySQL 8.0, we added in performance_schema a table
allowing you to easily find where a variable was defined.
Let’s check this in action with max_connections for example.
I started mysqld and now I check the value of
max_connections:
mysql> show global variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 151 | +-----------------+-------+
We can also use the performance.schema table called variables_info to get some more details about it:
mysql> SELECT t1.*, VARIABLE_VALUE
FROM performance_schema.variables_info t1
JOIN performance_schema.global_variables t2
ON t2.VARIABLE_NAME=t1.VARIABLE_NAME
WHERE …[Read more]