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

I am getting following error:

error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted

here is my /etc/my.cnf file:

[root@host backup]#cat /etc/my.cnf
max_allowed_packet=100M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

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

[mysqldump]
max_allowed_packet=100M
share|improve this question
3  
Seems you are missing [mysqld] clausse. –  val0x00ff Jan 22 '13 at 13:16
    
Thanks for prompt response ...!!Do I need to add [mysqld] as a first line into /etc/my.cnf? –  meMangesh Jan 22 '13 at 13:20
    
Is not necessary though as long as it's there and contains the correct directives that belong to the [mysqld] clausse. –  val0x00ff Jan 22 '13 at 13:22

1 Answer 1

up vote 5 down vote accepted

Add [mysqld] as a first line of your my.cnf-file.

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.