以下是5.6默认的设置,会占用至少400M的内存。
performance_schema_max_table_instances 12500
table_definition_cache 1400
table_open_cache 2000
所以你要调小这3个参数
mysql的配置文件:/etc/my.cnf
添加:
[mysqld]
#performance_schema_max_table_instances=400 #影响不大
table_definition_cache=400 #最小400,对内存占用影响大
#table_open_cache=500 #影响不大