/etc/my.cnf almost empty on new server

postcd

Well-Known Member
Oct 22, 2010
721
21
68
Hi, on my old cpanel server i hade full my.cnf file with various variables regarding mysql, but on my new cpanel installed server. Its almost empty.

I coppied configuration files of cpanel to a new server according to manual here: http://forums.cpanel.net/f5/process-moving-whm-cpanel-server-new-hardware-184192.html#post831162


[mysqld]
set-variable = max_connections=500
log-slow-queries
safe-show-database
bind-address = 127.0.0.1


---
My old server has variables like:

[mysqld]

log_slow_queries=/var/log/mysqld.slow.log
long_query_time=3

socket = /var/lib/mysql/mysql.sock
safe-show-database
old-password=1
set-variable = max_connections=300
interactive_timeout=80
wait_timeout=600
connect_timeout=30
key_buffer=1024M
join_buffer=2048M
join_buffer_size=724M
max_allowed_packet=512M
table_cache=8592
sort_buffer=64M
record_buffer=64M
thread_cache_size=64
max_user_connections=100
thread_concurrency=8
myisam_sort_buffer_size=256M
max_heap_table_size=512M
tmp_table_size=1024M
table_definition_cache=256M
innodb_buffer_pool_size=782M
query_cache_limit=312M
query_cache_size=312M
query_cache_type=1


How can i quickly and properly update my new server to have same values. Is it ok and safe to copy most important ones to new server my.cnf file?
 

postcd

Well-Known Member
Oct 22, 2010
721
21
68
First of all, your old my.cnf has ridiculously high values! those values are insane!

I suggest you run mysqltuner.pl and reconfigure those values...

http://mysqltuner.pl/mysqltuner.pl
Yes, the tunner recommended me these values. I have more sites and some has 1Gb+ databases.. If you have any exact suggestion on values, pls write them? But i would like to ask my primary question, if i can just copy them to new my.cnf, if its good idea.