MySQL Server Information SHOW VARIABLES example

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

To get all the server variables run this query either in the SQL window of your preferred interface (PHPMyAdmin or other) or in the MySQL CLI interface

SHOW VARIABLES;

You can specify if you want the session variables or the global variables as follows:

Session variables:

SHOW SESSION VARIABLES;

Global variables:

SHOW GLOBAL VARIABLES;

Like any other SQL command you can add parameters to your query such as the LIKE command:

SHOW [GLOBAL | SESSION] VARIABLES LIKE 'max_join_size';

Or, using wildcards:

SHOW [GLOBAL | SESSION] VARIABLES LIKE '%size%';

You can also filter the results of the SHOW query using a WHERE parameter as follows:

SHOW [GLOBAL | SESSION] VARIABLES WHERE VALUE > 0;


Got any MySQL Question?