Divi WordPress Theme

Topic: MySQL 5 Optimization  (Read 3802 times)

Offline scott

  • New Member
  • *
  • Posts: 33
  • iTrader: +0/-0
    • View Profile
MySQL 5 Optimization
« on: September 14, 2008, 06:55:11 PM »
Hi,

Can someone help me to optimize MySQL 5? What value should I set in my.cnf file?

In between, I am using cpanel-whm as a control panel.

Thanks in advance.

Scott
VPS Hosting - AccuWebHosting

Offline HRamesh

  • New Member
  • *
  • Posts: 34
  • iTrader: +0/-0
    • View Profile
Re: MySQL 5 Optimization
« Reply #1 on: October 25, 2008, 02:34:58 AM »
Here is my my.cnf:

[mysqld]
socket=/path/to/mysql.sock
datadir=/var/lib/mysql
skip-locking
skip-innodb
query_cache_type=1
query_cache_limit=1M
query_cache_size=32M
max_connections=300
interactive_timeout=100
wait_timeout=15
connect_timeout=10
table_cache=512
thread_cache=32
key_buffer=128M
thread_concurrency=2
log_slow_queries=/var/log/mysqld.slow.log
long_query_time=2

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout

[client]
socket=/path/to/mysql.sock

I have MySQL 4.1 but I think this should work with MySQL 5 (but not 100% sure). Also I have found one good article for MySQL optimization:

http://blog.dynom.nl/archives/MySQL-5-o ... 09_10.html

Regards,

Ramesh
Divi WordPress Theme
Tags: