Page 1 of 1

How to see current mySql parameters and settings

Posted: Tue Jan 09, 2018 1:44 pm
by Saman
Login to mySql server

Code: Select all

mysql -u username -p
Enter your password
Then enter following sql

Code: Select all

SELECT @@GLOBAL.innodb_data_file_path;
Now enter following command by changing LIKE part as required

Code: Select all

mysql> SHOW VARIABLES LIKE 'auto%';
Te above command returns a table such as below.

Code: Select all

+-----------------------------------------+---------------------------+
| Variable_name                           | Value                     |
+-----------------------------------------+---------------------------+
| auto_increment_increment                | 1                         |
| auto_increment_offset                   | 1                         |
| autocommit                              | ON                        |
| automatic_sp_privileges                 | ON                        |
You can also see Global and Session variables as below.

Code: Select all

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