Home Contact Us News Support Forum Search
Home arrow Documentation arrow MYSQL TUNING
MYSQL TUNING PDF Print E-mail

To increase your server performance and stability, it is very recomended to tune your mysql server.
You can find complete info about mysql server tuning here - http://dev.mysql.com/doc/refman/5.0/en/optimizing-the-server.html

Here I give main tuning variables.

You can tune your mysql server by modifying mysql configuration file my.cnf. Usually it's located at /etc/my.cnf.

You can add these lines into [mysqld] section of my.cnf:

 

[mysqld]
#if you use your mysql server only locally ( usual way ).
skip-networking
#to enable automatical recovering of mysql databases in case of power fault, for example.
myisam-recover
#to increase key buffer for better performance:
key_buffer = 32M
# for mysql 3.23 use set-variable=key_buffer_size = 32M instead.
#to enable query cache for better performance ( only for mysql 4.0 and up ) - very recommended!
query_cache_size= 32M
query_cache_type= 2
#If you don't use innodb and bdb tables in other mysql applications:
skip-bdb
skip-innodb
#Just in case your sites will grow to more than 1,5-2 millions visits per day
#we will increase maximum memory table size to keep info about all surfers :)
max_heap_table_size = 67108864
#for mysql 3.23 use set-variable=max_heap_table_size = 67108864 instead.


After changes to my.cnf done, restart your mysql server.

 
Next >