Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently installed MySQL server and client 5.5.28 through rpm packages on an openSUSE machine, and I was not able to locate my.cnf file. I look into all directories mysql --verbose --help | grep -C3 my.cnf printed which was /etc/my.cnf (no such a file), /etc/mysql/my.cnf(no directory as mysql), usr/etc/my.cnf (don't have etc in my usr) and ~/.my.cnf (doesn't exist). Then I tried find / -name *.cnf which gave me:


I want to edit my.cnf file to practice replication and high availability. I read somewhere that having my.cnf file won't be necessary to use MySQL well not in my case... so I was thinking to rename one these my-*.cnf to my.cnf and put it in the locations that MySQL would look for my.cnf file. But I'm not sure first if this would work, and second which one to pick to be able to practice replication.

I don't want to make it complex for myself, so I was thinking to take the medium one... Am I doing the right thing?

share|improve this question
up vote 0 down vote accepted

If you are doing replication and you are just practicing, the my.cnf you choose is not that important. However, the smaller the config, the better. For example, if you DB Server has 2GB RAM, you should not choose my-innodb-heavy-4G.cnf.

If you started up mysql with a my.cnf, you create the default 10M or 18M ibdata1 and 2 5M InnoDB log files (ib_logfile0, ib_logfile1). The medium cnf has the following InnoDB settings:

[root@******** ~]# cat /usr/share/mysql/my-medium.cnf | grep innodb
#innodb_data_home_dir = /var/lib/mysql
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

Since everything related to InnoDB is commented out, you should OK to choose my-medium.cnf

Simply run this:

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
service mysql restart

Now, as for MySQL Replication, I have Good News : I already answered a post back on Feb 06, 2012 ( How to setup replication(Master/slave) in MySQL 5.5.20? ) with all the steps you need to automate a Slave's creation.

Here is a couple more of my posts with more advanced replication setups

share|improve this answer
Thank you for the detailed answer. For the replication I'm setting up a master-master though. The process should share lots of steps with master-salve I think... Thanks anyway. – mrz Dec 22 '12 at 5:29

Your Answer


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.