Mysql Command required for getting values from the.cnf

MySQLmysql-5mysql-5.5

I am new to MySQL DBA, i have a doubt, Is there any command for finding my.cnf configuration file variables and its respective value which is mention in my.cnf file in mysql prompt itself. like we will see the global variable which are there in mysql in below format
mysql> show variable like'xxxx';

Similar kind of command is there for seeing all parameter present in my.cnf.

Best Answer

You could use this reference: MySQL Documentation.

For example:

mysql> SHOW VARIABLES;
+---------------------------------+-------------------------------------+
| Variable_name                   | Value                               |
+---------------------------------+-------------------------------------+
| auto_increment_increment        | 1                                   |
| auto_increment_offset           | 1                                   |
| automatic_sp_privileges         | ON                                  |
| back_log                        | 50                                  |
…

To obtain the row for a specific variable, use a LIKE clause as shown:

SHOW VARIABLES LIKE '%size%';
SHOW GLOBAL VARIABLES LIKE '%size%';