Bug #44628 Wrong error message when there is something wrong in my.cnf
Description:
MySQL gives this error message:
-----8<---------------8<---------------8<---------------8<----------
austvik@music-server:/var/log/squeezecenter$ sudo -u squeezecenter "/usr/sbin/mysqld" "--defaults-extra-file=/var/lib/squeezecenter/cache/my.cnf"
Could not open required defaults file: /var/lib/squeezecenter/cache/my.cnf
Fatal error in defaults handling. Program aborted
-----8<---------------8<---------------8<---------------8<----------
But that file is readable:
-----8<---------------8<---------------8<---------------8<----------
austvik@music-server:/var/log/squeezecenter$ sudo -u squeezecenter ls -al
/var/lib/squeezecenter/cache/my.cnf -rw-r--r-- 1 squeezecenter nogroup 1119 2009-05-03 17:11 /var/lib/squeezecenter/cache/my.cnf
austvik@music-server:/var/log/squeezecenter$ sudo -u squeezecenter head /var/lib/squeezecenter/cache/my.cnf
# $Id$
#
# SqueezeCenter specific MySQL Server config.
[mysqld]
innodb
skip-locking
# If you want to have user permissions - you need to setup a valid user, and
# remove this line below.
austvik@music-server:/var/log/squeezecenter$ sudo -u squeezecenter "/usr/sbin/mysqld" --version
/usr/sbin/mysqld Ver 5.0.75-0ubuntu10 for debian-linux-gnu on i486 ((Ubuntu))
-----8<---------------8<---------------8<---------------8<----------
I have updated the database, so I suspect that there might be something *inside* my.cnf that makes mysql abort - but it should tell me which configuration parameter inside my.cnf that is wrong instead of just telling me it can't open the file.
Oh, and MySQL is even more userunfriendly when I try to get some more information:
-----8<---------------8<---------------8<---------------8<----------
austvik@music-server:/var/log/squeezecenter$ sudo -u squeezecenter "/usr/sbin/mysqld" "--verbose" "--defaults-file=/var/lib/squeezecenter/cache/my.cnf"
090503 17:20:19 [ERROR] /usr/sbin/mysqld: unknown variable 'defaults-file=/var/lib/squeezecenter/cache/my.cnf'
-----8<---------------8<---------------8<---------------8<----------
How to repeat:
I don't know what triggers it, it started after updating from Ubuntu 8.10 to Ubuntu 9.4 without updating another package. Maybe by having parameters in my.cnf that does not exist any more.
Suggested fix:
Better error messages when opening and parsing --defaults-file
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.066 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.