免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2751 | 回复: 5
打印 上一主题 下一主题

mysql远程连接提示内存不足错误! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-26 14:05 |只看该作者 |倒序浏览
本帖最后由 love_gzh 于 2011-12-26 14:09 编辑

操作系统:
  1. [root@localhost ~]# uname -a
  2. Linux localhost 2.6.18-128.el5PAE #1 SMP Wed Dec 17 12:02:33 EST 2008 i686 i686 i386 GNU/Linux
复制代码
mysql版本:
  1. [root@localhost ~]# mysql -V
  2. mysql  Ver 14.14 Distrib 5.5.9, for Linux (i686) using  EditLine wrapper
复制代码
配置文件:
  1. [mysqld]
  2. port = 3306
  3. socket = /tmp/mysql.sock

  4. max_connect_errors = 30
  5. max_connections = 50
  6. table_cache = 196
  7. max_heap_table_size = 300M
  8. sort_buffer_size = 8M
  9. join_buffer_size = 2M
  10. thread_cache = 8
  11. thread_concurrency = 8
  12. query_cache_size = 32M
  13. query_cache_limit = 2M
  14. tmp_table_size = 512M
  15. log_slow_queries
  16. long_query_time = 8
  17. tmpdir = /home/mysql/
  18. server-id = 1
  19. skip-name-resolve
  20. skip-external-locking
  21. lower_case_table_names=1

  22. #log_bin
  23. binlog_cache_size = 1M
  24. #max_allowed_packet = 16M       #when use large BLOBs
  25. #default-character-set = utf8
  26. character_set_server=utf8

  27. ########## MyIsam ##########
  28. key_buffer = 32M
  29. read_buffer_size = 2M
  30. read_rnd_buffer_size = 2M
  31. myisam_recover

  32. ########## InnoDB ##########
  33. innodb_additional_mem_pool_size = 32M
  34. innodb_data_file_path = ibdata1:10M:autoextend
  35. innodb_buffer_pool_size = 1000M
  36. innodb_flush_log_at_trx_commit = 2
  37. innodb_log_buffer_size = 8M
  38. innodb_log_file_size = 200M
  39. innodb_file_per_table
  40. innodb_file_format=Barracuda
  41. #innodb_force_recovery = 1
  42. #innodb-support-xa = 0

  43. event_scheduler = on
  44. [client]
  45. port = 3306
  46. socket = /tmp/mysql.sock
  47. default-character-set = utf8

  48. [mysqldump]
  49. quick
  50. max_allowed_packet=16M
  51. #default-character-set = gb2312

  52. [mysql]
  53. no-auto-rehash

  54. [isamchk]
  55. key_buffer = 256M
  56. sort_buffer_size = 256M
  57. read_buffer = 2M
  58. write_buffer = 2M

  59. [myisamchk]
  60. key_buffer = 256M
  61. sort_buffer_size = 256M
  62. read_buffer = 2M
  63. write_buffer = 2M

  64. [mysqlhotcopy]
  65. interactive-timeout

  66. [mysqld_safe]
  67. open-files-limit = 8192
复制代码
在使用SQLyog连接时出现一下错误,



希望各位大侠帮忙解决,谢谢

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52戌狗
日期:2013-12-27 15:08:11
2 [报告]
发表于 2011-12-26 14:40 |只看该作者
操作系统:mysql版本:配置文件:在使用SQLyog连接时出现一下错误,



love_gzh 发表于 2011-12-26 14:05
操作系统:mysql版本:配置文件:在使用SQLyog连接时出现一下错误,


69.key_buffer = 256M

70.sort_buffer_size = 256M---这个改小点
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections---算算你要用多大内存才跑得起来

tmp_table_size这个也改小点

论坛徽章:
0
3 [报告]
发表于 2011-12-26 15:43 |只看该作者
回复 1# love_gzh

你总的内存多大?
sort_buffer_size = 8M 可以设置小一点,这个参数是session级别的。
   

论坛徽章:
0
4 [报告]
发表于 2011-12-28 15:33 |只看该作者
谢谢各位大侠的支持,服务器内存为8G,

论坛徽章:
0
5 [报告]
发表于 2011-12-28 17:52 |只看该作者
  1. 我想知道这个错误是值物理内存错误呢,还是指临时表内存不足呢。
复制代码

论坛徽章:
0
6 [报告]
发表于 2011-12-29 12:47 |只看该作者
学习 大侠们的指点
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP