Divi WordPress Theme

MySQL 5 Optimization

Topic: MySQL 5 Optimization  (Read 6072 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
Shopify Divi WordPress Theme
Tags:

Check MySQL service uptime through command line

Started by KailashBoard How Tos

Replies: 2
Views: 21322
Last post November 22, 2011, 10:03:24 PM
by Mrtu92
commands to start/stop/restart MySQL server

Started by AnonymousBoard MySQL

Replies: 3
Views: 5776
Last post September 20, 2021, 08:56:45 PM
by kumkum
MySQL error - Too many MySQL connections

Started by digitalpointBoard cPanel/WHM

Replies: 2
Views: 5087
Last post November 25, 2009, 07:02:28 PM
by kvchosting
check PHP and MySQL version through shell (SSH) on Linux Server

Started by KailashBoard cPanel/WHM

Replies: 10
Views: 74643
Last post January 11, 2019, 07:18:59 PM
by rubyatiy
Converting Microsoft Access Databases to MySQL

Started by TechBoard MS Access

Replies: 0
Views: 4757
Last post August 29, 2007, 02:21:15 AM
by Tech