Web Hosting Forum - A Web Hosting community for Webmasters


Divi WordPress Theme

Author Topic: MySQL 5 Optimization  (Read 3625 times)

0 Members and 1 Guest are viewing this topic.

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:
 

Related Topics

  Subject / Started by Replies Last post
1 Replies
2443 Views
Last post April 10, 2013, 12:12:01 PM
by Steve Smith
2 Replies
3316 Views
Last post November 25, 2009, 07:02:28 PM
by kvchosting
36 Replies
6966 Views
Last post February 14, 2013, 11:35:17 AM
by Steve Smith
5 Replies
1745 Views
Last post October 03, 2017, 02:35:34 PM
by JesicaJoh
0 Replies
988 Views
Last post October 18, 2014, 02:39:41 PM
by Kailash