LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1072|回复: 0

关于mysql的问题,在线等

[复制链接]
发表于 2004-6-9 21:30:08 | 显示全部楼层 |阅读模式
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

我的mysql起不来了
情况具体:
环境:freebsd5.2+apache2.0.48+mysql4.0.20+php4.3.6
安装完成后,启动运行一切正常。
但当我提供一个站点流量统计服务后,我的Mysql并发数会超过100。
会经常出现too many connections的错误提示。

当我将my-huge.cnf 拷到 path-to-mysql/var/my.cnf,并在my.cnf中添加一项max_connections=1000,当对库的操作比较频繁时,mysql就会出现很多的locked进程和很多sleep进程,而且在使用一段时间后Mysql就拒绝服务,出现200错误(ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61) );
而移除my.cnf后,对库大访问量时,locked进程减少,sleep进程依然很多,但会出现too many connections错误。

有谁知道mysql默认的配置文件使用的是哪里的?
对于使用大访问量的使用mysql,谁有比较好的对策吗?
还望不吝指教。
不甚感激!

以下是错误日志文件部分内容:
Number of processes running now: 0
040604 23:50:35 mysqld restarted
040604 23:50:35 InnoDB: Started
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.0.20' socket: '/tmp/mysql.sock' port: 3306
040604 23:50:43 Aborted connection 17 to db: 'count' user: 'count' host: `localhost' (Got an error reading communication packets)
040604 23:50:45 Aborted connection 10 to db: 'count' user: 'count' host: `localhost' (Got an error reading communication packets)
040604 23:50:47 Aborted connection 9 to db: 'count' user: 'count' host: `localhost' (Got an error reading communication packets)
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8388600
read_buffer_size=131072
max_used_connections=17
max_connections=100
threads_connected=16
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225791 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Number of processes running now: 0
040604 23:50:51 mysqld restarted
040604 23:50:51 InnoDB: Started
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.0.20' socket: '/tmp/mysql.sock' port: 3306
040604 23:51:08 Aborted connection 4 to db: 'count' user: 'count' host: `localhost' (Got an error reading communication packets)
040604 23:51:26 Aborted connection 16 to db: 'count' user: 'count' host: `localhost' (Got an error reading communication packets)
040604 23:51:42 Aborted connection 12 to db: 'count' user: 'count' host: `localhost' (Got an error reading communication packets)
040604 23:51:54 Aborted connection 36 to db: 'count' user: 'count' host: `localhost' (Got an error reading communication packets)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表