MySQL大可使用内存(M):
select (@@key_buffer_size +@@innodb_buffer_pool_size + @@tmp_table_size + @@max_connections*(@@read_buffer_size + @@read_rnd_buffer_size + @@sort_buffer_size + @@join_buffer_size + @@binlog_cache_size + @@thread_stack) )/1024/1024 as "Total_AllMem result";
MySQL单个连接大可使用内存(M):
select (@@read_buffer_size + @@read_rnd_buffer_size + @@sort_buffer_size + @@join_buffer_size + @@binlog_cache_size + @@thread_stack)/1024/1024 as "Connection result";
MySQL大可使用内存(不包含连接占用内存)(M):
select (@@key_buffer_size +@@innodb_buffer_pool_size+ @@tmp_table_size )/1024/1024 as "Total_Mem result";
经典的MySQL内存计算器网站:
/tupian/20230522/