MySQL的配置问题

由 剑心 在 08-15-2004 23:14 发表:

MySQL的配置问题

我的服务器的配置是:

双至强2.4G

内存:2G

我的系统是FreeBSD5.2.1(R)

Apache/2.0.48 (Unix) PHP/4.3.4 MySQL-4.0.20

编译后能正常启动

我想修改一下MySQL配置文件

增加最大连接数,但我重启MySQL服务器时出现了一下错误

我在.err文件的提示如下:

040815 01:53:36 mysqld started

Warning: Ignoring user change to 'root' because the user was set to 'mysql' earlier on the command line

mysqld in malloc(): error: allocation failed

mysqld got signal 6;

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=536870912

read_buffer_size=33550336

max_used_connections=0

max_connections=512

threads_connected=0

It is possible that mysqld could use up to

key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 522236 K

bytes of memory

Hope that's ok; if not, decrease some variables in the equation.

mysqld in free(): error: recursive call

Fatal signal 6 while backtracing

040815 01:53:36 mysqld ended

key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 522236 K 这一句好像在说可能用掉500多M内存

但我有2G内存,应该够了吧

但总是启动不了

这是什麽原因啊?


知我者谓我心忧

不知我者谓我何求


由 剑心 在 08-15-2004 23:17 发表:


附上我的my.cnf文件如下:

麻烦大家帮忙分析一下:

[client]

#password = your_password

port = 3306

socket = /home/mysql/var/mysql.sock

Here follows entries for some specific programs

The MySQL server

[mysqld]

port = 3306

socket = /home/mysql/var/mysql.sock

skip-locking

key_buffer = 512M

max_allowed_packet = 4M

table_cache = 1024

sort_buffer_size = 512K

net_buffer_length = 8K

myisam_sort_buffer_size = 128M

long_query_time=1

join_buffer_size=32M

connect_timeout=20

max_connect_errors=30000

max_connections=512

sort_buffer=32M

record_buffer=32M

thread_cache=64

skip-bdb

skip-innodb

wait_timeout=120

interactive_timeout=120

max_heap_table_size=256M

tmp_table_size=128M

thread_concurrency=8

[mysqldump]

quick

max_allowed_packet = 4M

[mysql]

no-auto-rehash

Remove the next comment character if you are not familiar with SQL

#safe-updates

[isamchk]

key_buffer = 128M

sort_buffer_size = 20M

read_buffer = 2M

write_buffer = 2M

[myisamchk]

key_buffer = 128M

sort_buffer_size = 20M

read_buffer = 2M

write_buffer = 2M

[mysqlhotcopy]

interactive-timeout


知我者谓我心忧

不知我者谓我何求


由 剑心 在 08-16-2004 09:42 发表:


这个我又将key_buffer 改为256

max_connections改为800

结果就能启动MySQL了


知我者谓我心忧

不知我者谓我何求


由 剑心 在 08-16-2004 15:09 发表:


又出问题了

我修改了配置文件,正常启动MySQL以后

过一段时间服务器就说不能通过mysql.sock连接数据库了

我分析了一下是:

系统不能杀死mysql僵死的进程

我用mysql用户编译的MySQL啊,进程也显示是mysql的

请问怎麽办啊?

附上我的配置文件:(my.cnf)

[client]

#password = your_password

port = 3306

socket = /home/mysql/var/mysql.sock

Here follows entries for some specific programs

The MySQL server

[mysqld]

port = 3306

socket = /home/mysql/var/mysql.sock

skip-locking

key_buffer = 256M

max_allowed_packet = 4M

table_cache = 1024

sort_buffer_size = 512K

net_buffer_length = 8K

myisam_sort_buffer

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus