1select @@global.datetime_format; 2@@global.datetime_format 3%Y-%m-%d %H:%i:%s 4Warnings: 5Warning 1287 '@@datetime_format' is deprecated and will be removed in a future release. 6select @@session.datetime_format; 7ERROR HY000: Variable 'datetime_format' is a GLOBAL variable 8show global variables like 'datetime_format'; 9Variable_name Value 10datetime_format %Y-%m-%d %H:%i:%s 11show session variables like 'datetime_format'; 12Variable_name Value 13datetime_format %Y-%m-%d %H:%i:%s 14select * from information_schema.global_variables where variable_name='datetime_format'; 15VARIABLE_NAME VARIABLE_VALUE 16DATETIME_FORMAT %Y-%m-%d %H:%i:%s 17select * from information_schema.session_variables where variable_name='datetime_format'; 18VARIABLE_NAME VARIABLE_VALUE 19DATETIME_FORMAT %Y-%m-%d %H:%i:%s 20set global datetime_format="foo"; 21ERROR HY000: Variable 'datetime_format' is a read only variable 22set session datetime_format="foo"; 23ERROR HY000: Variable 'datetime_format' is a read only variable 24