wamp中mysqld占用内存大mysql5.6

网上常用方法,但不适用。

innodb_buffer_pool_size=576M ->256M InnoDB引擎缓冲区占了大头,首要就是拿它开刀

query_cache_size=100M          ->16M 查询缓存

tmp_table_size=102M                ->64M 临时表大小

key_buffer_size=256m                ->32M


正确方法:

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. performance_schema_max_table_instances=600  
  2. table_definition_cache=400  
  3. table_open_cache=256  

即在my.ini文件的mysqld下添加该块内容

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. # The MySQL server  
  2. [wampmysqld]  
  3. port        = 3306  
  4. socket      = /tmp/mysql.sock  
  5. key_buffer = 16M  
  6. max_allowed_packet = 1M  
  7.   
  8. sort_buffer_size = 512K  
  9. net_buffer_length = 8M  
  10. read_buffer_size = 256K  
  11. read_rnd_buffer_size = 512K  
  12. myisam_sort_buffer_size = 8M  
  13. basedir=c:/wamp/bin/mysql/mysql5.6.12  
  14. log-error=c:/wamp/logs/mysql.log  
  15. #datadir=c:/wamp/bin/mysql/mysql5.6.12/data  
  16. datadir=e:/mysql/data  
  17.   
  18. performance_schema_max_table_instances=600  
  19. table_definition_cache=400  
  20. table_open_cache=256  

重启后,mysqld内存减少很多


原文地址:http://blog.csdn.net/webnoties/article/details/20034967



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值