Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In a Centos VPS i want to tune Mysql Server:

find -name *my*cfn
./usr/share/doc/mysql-server-5.0.77/my-huge.cnf
./usr/share/doc/mysql-server-5.0.77/my-innodb-heavy-4G.cnf
./usr/share/doc/mysql-server-5.0.77/my-small.cnf
./usr/share/doc/mysql-server-5.0.77/my-medium.cnf
./usr/share/doc/mysql-server-5.0.77/my-large.cnf
./usr/share/mysql/my-huge.cnf
./usr/share/mysql/my-innodb-heavy-4G.cnf
./usr/share/mysql/my-small.cnf
./usr/share/mysql/my-medium.cnf
./usr/share/mysql/my-large.cnf
./etc/my.cnf

The content of /etc/my.cfn is:

# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

it is too small, isn't it? do i have to put here my values for parameters key_buffer_size innodb_additional_mem_pool_size innodb_log_file_size etc??

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Well it's the configuration file without any settings. No problem with that. You can either create [mysqld] section and tune whatever you want in it, or you can copy one of the example files (./usr/share/mysql/*) to /etc/my.cnf and tune that.

To check if /etc/my.cnf is getting used, run mysqld --help --verbose | head -n 20 and look for lines like:

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.