Chinaunix首页 | 论坛 | 博客
  • 博客访问: 547360
  • 博文数量: 36
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1749
  • 用 户 组: 普通用户
  • 注册时间: 2013-08-20 16:13
个人简介

中国科学院大学计算机硕士,曾在新浪爱彩数据库组带DBA团队,现居新加坡。wx: lihui_dba

文章分类

全部博文(36)

文章存档

2020年(2)

2019年(3)

2017年(7)

2016年(1)

2015年(7)

2014年(11)

2013年(5)

分类: Mysql/postgreSQL

2014-06-05 18:14:02

mysql无法连接数据库,连root账号都无法连接进去。查看错误日志发现有很多错误:[ERROR] Error in accept: Too many open files。
查看global参数open_files_limit=1024,但是my.cnf里面open_files_limit = 65535 ,
查看操作系统的ulimit -n也是1024,因此断定是mysql打开文件数过多超出限制导致。

解决办法:
ulimit -SHn 65536
 vi /etc/security/limits.conf
添加
mysql soft nofile 65535
mysql hard nofile 65535
再重启mysql,查看global参数open_files_limit,已经是65535了。


参考文档:
http://blog.sina.com.cn/s/blog_4a071ed80100st7z.html

阅读(2487) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~