Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-01-2011, 03:47 PM   #1
Senior Member
Registered: Dec 2004
Posts: 1,025

Rep: Reputation: 67
my.cnf on debian squeeze. var names don't match, var values missing.

I'm trying to configure a server to act as a mysql server and that's about it. i've got apache and stuff installed for phpmyadmin but I won't be running any web apps on this machine.

This machine is pretty muscular 64-bit debian squeeze machine and has 4GB of RAM and 4 cores. Obviously, I'd like MySQL to take advantage of this power.

This brings me to the mysql configuration file, /etc/mysql/my.cnf. This file lacks the vast majority of configuration variables listed on the mysql site and uses values like 128M and 128K which I assume refer to Megabytes and Kilobytes, respectively. I'm sort of wondering a) where the defaults come from and b) whether it's OK to just add entries to my.cnf which correspond to those values in the docs and c) what appropriate values might be for my new, muscular server.

Any advice would be most welcome.

I have attached both my.cnf and the output from mysqld --verbose --help.
Attached Files
File Type: txt my.cnf.txt (3.4 KB, 22 views)
File Type: txt mysql_vars.txt (60.7 KB, 12 views)
Old 07-03-2011, 01:59 AM   #2
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
I am answering because this thread has gone long without a reply and I, too, am curious about my.cnf values rather than because I have any expertise ...

There's amazingly little information on the 'net about adjusting my.cnf which, combined with the line "# The following values assume you have at least 32M ram" suggest that a) the sample my.cnf is historical and b) the values do not significantly effect performance (or there would be more discussion of adjustments online. So why have them?). One option would be to run MySQLTuner-perl and/or and try what they suggest.

Other distros have a selection of sample files such as my-huge.cnf, my-large.cnf, my-medium.cnf and my-small.cnf with the intention that you copy the appropriate one to my.cnf. Hopefully the good people at Debian have packaged MySQL the way they have because it works OK. Curious then that the one-size-fits-all approach is used when it isn't/wasn't by other distros.

Here are the effective lines from my-huge.cnf from Slackware64 13.1 which describes itself as "for a large system with memory of 1G-2G where the system runs mainly MySQL":
port		= 3306
socket		= /var/run/mysql/mysql.sock
port		= 3306
socket		= /var/run/mysql/mysql.sock
key_buffer_size = 384M
max_allowed_packet = 1M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
thread_concurrency = 8
server-id	= 1
max_allowed_packet = 16M
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot [var does not exist] deb squeeze Kraiser10 Linux - Newbie 7 07-29-2010 06:59 AM
Getting strange user names in /var/log/messages. stf92 Linux - Newbie 19 05-26-2009 11:02 AM
pam does not like my owner, group and date for /var/ftp. especially /var manis2008 Linux - Software 1 02-08-2008 07:36 AM
I need default rwx values for /var /usr =/ dmx9595 Linux - General 6 05-26-2004 05:15 PM
loop for generating var names ? Dominik Programming 1 12-11-2003 04:19 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration