Bug #31312 mysqld: unknown variable mysqld: unknown variable defaults-file/defaults-extra
Submitted: 1 Oct 2007 11:50 Modified: 1 Oct 2007 12:34
Reporter: volk augstein Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:4.1.22 OS:Linux
Assigned to: CPU Architecture:Any
Tags: config, defaults, defaults-extra-file, defaults-file, my.cnf

[1 Oct 2007 11:50] volk augstein
Description:
unknown variable 'defaults-file=...'
and
unknown variable 'defaults-extra-file=...'

How to repeat:
this is really weird. just a fresh install of 4.1.22 compiled from source

command :
/home/mysql/v4/current/bin/mysqld_safe --datadir=/home/mysql/DATA1.v4
--pid-file=/home/mysql/DATA1.v4/myhost.com.pid --port=3309 --socket=/tmp/mysql4-1.sock
--err-log=/home/LOGS/mysql/mysql4-1.err.log
--defaults-extra-file=/home/mysql/v4/mysql4-1.cnf --log=/home/LOGS/mysql/mysql4-1.log

errorlog:

[root]# tail /home/LOGS/mysql/mysql4-1.err.log
071001 13:35:08  mysqld started
071001 13:35:08 [ERROR] /home/mysql/v4/current/libexec/mysqld: unknown variable
'defaults-file=/home/mysql/v4/mysql4-1.cnf'

071001 13:35:08  mysqld ended

071001 13:43:13  mysqld started
071001 13:43:13 [ERROR] /home/mysql/v4/4.1.22/libexec/mysqld: unknown variable
'defaults-extra-file=/home/mysql/v4/mysql4-1.cnf'

071001 13:43:13  mysqld ended

---

still guessing around and not working.

Suggested fix:
fix it pls. problem was reported before, but no solution yet.
[1 Oct 2007 11:56] volk augstein
this can be fixed by setting the --defaults-file option at the beginning of the options list!!!!!
weird, but works :)

home/mysql/v4/current/bin/mysqld_safe --defaults-file=/home/mysql/v4/mysql4-1.cnf  --datadir=/home/mysql/DATA1.v4 --pid-file=/home/mysql/DATA1.v4/myhost.pid --port=3309 --socket=/tmp/mysql4-1.sock --err-log=/home/LOGS/mysql/mysql4-1.err.log --log=/home/LOGS/mysql/mysql4-1.log
[1 Oct 2007 12:34] Hartmut Holzgraefe
This is documented on 

http://dev.mysql.com/doc/refman/5.0/en/option-files.html

i agree though that the error messages are not too helpfull,
this has already been reported as bug #30994 though
[28 Sep 2010 11:58] Uma Bhat
I faced the same issue on Redhat Linux/ MySQL community version 5.0.77 -

[ERROR] /usr/libexec/mysqld: unknown variable 'defaults-file=/var/lib/mysql/my.cnf'

However, it worked for me in this way:

If mysqld_safe is installed as /usr/bin/mysqld_safe, and mysqld binary exists in /usr/libexec,

$ cd /usr
$ ./bin/mysqld_safe --defaults-file=/var/lib/mysql/my.cnf --user=mysql --ledir=/usr/libexec &

Hope this helps someone like me, who took ample amount of time investigating what went wrong!

Regards,
Uma