1SET @start_global_value = @@global.gtid_mode; 2SELECT @start_global_value; 3@start_global_value 4OFF 5select @@global.gtid_mode; 6@@global.gtid_mode 7OFF 8select @@session.gtid_mode; 9ERROR HY000: Variable 'gtid_mode' is a GLOBAL variable 10show global variables like 'gtid_mode'; 11Variable_name Value 12gtid_mode OFF 13show session variables like 'gtid_mode'; 14Variable_name Value 15gtid_mode OFF 16select * from information_schema.global_variables where variable_name='gtid_mode'; 17VARIABLE_NAME VARIABLE_VALUE 18GTID_MODE OFF 19select * from information_schema.session_variables where variable_name='gtid_mode'; 20VARIABLE_NAME VARIABLE_VALUE 21GTID_MODE OFF 22set global gtid_mode = "ON"; 23ERROR HY000: Variable 'gtid_mode' is a read only variable 24select @@global.gtid_mode; 25@@global.gtid_mode 26OFF 27set session gtid_mode = 1; 28ERROR HY000: Variable 'gtid_mode' is a read only variable 29