1select @@global.host_cache_size; 2@@global.host_cache_size 3123 4select @@session.host_cache_size; 5ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable 6show global variables like 'host_cache_size'; 7Variable_name Value 8host_cache_size 123 9show session variables like 'host_cache_size'; 10Variable_name Value 11host_cache_size 123 12select * from information_schema.global_variables 13where variable_name='host_cache_size'; 14VARIABLE_NAME VARIABLE_VALUE 15HOST_CACHE_SIZE 123 16select * from information_schema.session_variables 17where variable_name='host_cache_size'; 18VARIABLE_NAME VARIABLE_VALUE 19HOST_CACHE_SIZE 123 20set global host_cache_size=1; 21select @@global.host_cache_size; 22@@global.host_cache_size 231 24set global host_cache_size=12; 25select @@global.host_cache_size; 26@@global.host_cache_size 2712 28set global host_cache_size=0; 29select @@global.host_cache_size; 30@@global.host_cache_size 310 32set global host_cache_size=65536; 33select @@global.host_cache_size; 34@@global.host_cache_size 3565536 36set session host_cache_size=1; 37ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable and should be set with SET GLOBAL 38set global host_cache_size=-1; 39Warnings: 40Warning 1292 Truncated incorrect host_cache_size value: '-1' 41select @@global.host_cache_size; 42@@global.host_cache_size 430 44set global host_cache_size=-1024; 45Warnings: 46Warning 1292 Truncated incorrect host_cache_size value: '-1024' 47select @@global.host_cache_size; 48@@global.host_cache_size 490 50set global host_cache_size=65537; 51Warnings: 52Warning 1292 Truncated incorrect host_cache_size value: '65537' 53select @@global.host_cache_size; 54@@global.host_cache_size 5565536 56set global host_cache_size=100000; 57Warnings: 58Warning 1292 Truncated incorrect host_cache_size value: '100000' 59select @@global.host_cache_size; 60@@global.host_cache_size 6165536 62set global host_cache_size=4294967295; 63Warnings: 64Warning 1292 Truncated incorrect host_cache_size value: '4294967295' 65select @@global.host_cache_size; 66@@global.host_cache_size 6765536 68set global host_cache_size=123; 69select @@global.host_cache_size; 70@@global.host_cache_size 71123 72