bjarne

Well-Known Member
Mar 23, 2002
135
0
316
I was looking on the /etc/my.cfg config file for mysql, and all it have is :

[mysqld]
set-variable = max_connections=500

I think it is a litle bit minimal ? Wold not this make it easy to take down a server easy with som stupid scripting?

I am thinking of moving one of the config files that is included with mysql over, but I don't realy know wich would be best.

Anyone worked with this?
 

Danks

Active Member
Oct 10, 2001
26
1
303
i use the following for all the cpanel servers. WHM will overwrite it so I generally chattr +i /etc/my.cnf

[client]
port = 3306

[mysqld]
port = 3306
#socket = /var/tmp/mysql.sock
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
set-variable = max_connections = 500
set-variable = max_user_connections = 45


[mysqldump]
quick
set-variable = max_allowed_packet=16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

[mysqlhotcopy]
interactive-timeout