Mysql Command required for getting values from my.cnf
You could use this reference: MySQL Documentation.

For example:

mysql&gt; 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%';