Server Fault is a question and answer site for system and network administrators. 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 installed mysql-server-5.1 on my Ubuntu server using apt-get install mysql-server, but i cant find my.cnf file.

It is not in /etc/mysql. In /etc/mysql i have only:


I have tried uninstalling/installing mysql multiple times, but still nothing.

Also, when installing mysql, i get messages like this: (i have installed dialog)

debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
share|improve this question
Try to find it: find / -name my.cnf – lg. Oct 8 '10 at 16:11
up vote 0 down vote accepted

You can copy one from /usr/share/doc/mysql-server-5.1/examples/ . Rename it to my.cnf and place in /etc/mysql/my.cnf

and about dialog , set your TERM environment variable.

share|improve this answer

EDITED : Sometimes the my.cnf is located in just the /etc directory.


share|improve this answer

If you installed mysql-server, it should have installed mysql-common which includes that file. I'm guessing that something failed in that installation, disk out of space, interrupted for whatever reason.

apt-get --reinstall install mysql-common

which is a predependency for mysql-server-5.1

If it comes up with errors, try:

dpkg --reconfigure -a


apt-get -f install
share|improve this answer

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.