MySQL: To see GLOBAL and SESSION variables side by side

 here’s a single MySQL query that shows a system parameter’s GLOBAL and SESSION values side-by-side.

You just replace 'sql_mode' with the variable you want to check.

Sql
SELECT gv.VARIABLE_NAME, gv.VARIABLE_VALUE AS GLOBAL_VALUE, sv.VARIABLE_VALUE AS SESSION_VALUE FROM performance_schema.global_variables gv JOIN performance_schema.session_variables sv ON gv.VARIABLE_NAME = sv.VARIABLE_NAME WHERE gv.VARIABLE_NAME = 'sql_mode';

Comments

Popular posts from this blog

PeopleSoft: Clean Up PUM

Postgres: Clean up stopped replication slot