1select @@global.date_format;
2@@global.date_format
3%Y-%m-%d
4select @@session.date_format;
5ERROR HY000: Variable 'date_format' is a GLOBAL variable
6show global variables like 'date_format';
7Variable_name	Value
8date_format	%Y-%m-%d
9show session variables like 'date_format';
10Variable_name	Value
11date_format	%Y-%m-%d
12select * from information_schema.global_variables where variable_name='date_format';
13VARIABLE_NAME	VARIABLE_VALUE
14DATE_FORMAT	%Y-%m-%d
15select * from information_schema.session_variables where variable_name='date_format';
16VARIABLE_NAME	VARIABLE_VALUE
17DATE_FORMAT	%Y-%m-%d
18set global date_format="foo";
19ERROR HY000: Variable 'date_format' is a read only variable
20set session date_format="foo";
21ERROR HY000: Variable 'date_format' is a read only variable
22