Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 323165

Summary: =dev-db/mysql-5.1.46 : [ERROR] mysqld: unknown option '--skip-federated'
Product: Gentoo/Alt Reporter: Florian CROUZAT (SuperFlo) <gentoo>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED INVALID    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: OS X   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
$EPREFIX/etc/mysql/my.cnf
mysqld --print-defaults
mysqld --verbose --help
OSX my.cnf, didn't came with the prefix.

Description Florian CROUZAT (SuperFlo) 2010-06-08 10:48:03 UTC
It's been a few time I haven't started mysqld, it was working fine with version 5.0.90-r2, but won't start anymore with 5.1.46 outputing in mysqld.err "[ERROR] mysqld: unknown option '--skip-federated'"

Here are the use flags (they have been updated, as you can see, which is probably the problem, here.) 5.1.46 has a new use flag: extraengine, and hasn't the berkdb flag anymore.

Note that I'm not a mysql expert, and don't really even know what federated is.
I can't find which file set the --skip-federated option, and the daemon won't start anymore. strings $(type -p mysqld) | grep -i federated ; matches, though.

I tried to set the extraengine flag but it didn't change a thing. It probably means that --skip-federated is hardcoded in the mysqld binary ?

I also found this bug http://bugs.mysql.com/bug.php?id=26391 ... 

Any thoughts ?

----

emerge -pv =mysql-5.0.90-r2
[ebuild     UD] dev-db/mysql-5.0.90-r2 [5.1.46] USE="berkdb%* community perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -profiling (-selinux) -static -test (-pbxt%) (-xtradb%)" 22,807 kB
[ebuild     UD] virtual/mysql-5.0 [5.1] 0 kB

emerge -pv mysql
[ebuild   R   ] dev-db/mysql-5.1.46  USE="community perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -pbxt -profiling (-selinux) -static -test -xtradb" 0 kB
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-06-11 15:23:40 UTC
Probably need the expertise of the mysql team to triage this one.
Comment 2 Francesco Riosa 2010-06-11 15:32:26 UTC
federated is a storage engine,
http://dev.mysql.com/doc/refman/5.1/en/federated-storage-engine.html
the option snow has inverted logic it's --federated, however you don't need it probably.

grep -rls federated /etc/mysql /etc/conf.d/mysql

should tell you where it's referenced
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-06-11 17:44:13 UTC
Our stock config does not contain 'skip-federated' at all, so it's somewhere in your own config.

Just find it and comment it out.
Comment 4 Florian CROUZAT (SuperFlo) 2010-06-11 20:30:52 UTC
Four things come to mind:

1/ We don't have a conf.d directory in gentoo prefix, nor a init.d script for mysql.
2/ I didn't changed my configuration and it was working before
3/ grep -Rils federated # doesn't match in etc/mysql
4/ strings $(type -p mysqld) | grep -i federated # match.

Any ideas ?
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-06-12 06:08:45 UTC
- You didn't give us ANY emerge --info output at all.
- How are you starting the mysqld if you aren't using the init.d script?
- What are the EXACT arguments you're starting it with?
Comment 6 Florian CROUZAT (SuperFlo) 2010-06-12 08:42:03 UTC
True, sorry. You'll find my emerge --info attached.
I start mysql using this command: shell>nohup mysqld &

I noticed another thing while re-reading my.cnf:
shell>mysqld --verbose
100612 10:39:48 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.

The thing is under [mysqld] in my.cnf, there is skip-external-locking set.
I'll paste my.cnf also.

Just ask if you want any other infos, hope it helps.
Comment 7 Florian CROUZAT (SuperFlo) 2010-06-12 08:42:47 UTC
Created attachment 235035 [details]
emerge --info
Comment 8 Florian CROUZAT (SuperFlo) 2010-06-12 08:44:18 UTC
Created attachment 235037 [details]
$EPREFIX/etc/mysql/my.cnf
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-06-12 08:52:02 UTC
Can you include the output for these:
# mysqld --print-defaults
# mysqld --verbose --help

It's acting like you have another MySQL config file somewhere. Look around on your system maybe?
Comment 10 Florian CROUZAT (SuperFlo) 2010-06-12 11:47:56 UTC
Yes you are totally right, I should have thought about that before. It totally use the /etc/my.cnf from my OSX system, instead of using the PREFIXED my.cnf.

I'll attach:
# mysqld --print-defaults
# mysqld --verbose --help
# egrep -v "^(#|$)" /etc/my.cnf # the osx one, not prefixed.

I guess it means either previous prefixed mysqld binary was patched to only use the prefixed my.cnf, or that it was also using my osx my.cnf, but the options were valid at this time, and I didn't noticed ...
Comment 11 Florian CROUZAT (SuperFlo) 2010-06-12 11:48:23 UTC
Created attachment 235057 [details]
mysqld --print-defaults
Comment 12 Florian CROUZAT (SuperFlo) 2010-06-12 11:48:33 UTC
Created attachment 235059 [details]
mysqld --verbose --help
Comment 13 Florian CROUZAT (SuperFlo) 2010-06-12 11:49:26 UTC
Created attachment 235061 [details]
OSX my.cnf, didn't came with the prefix.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-06-12 17:21:36 UTC
There is your skip-federated in the OSX config yes.

The change that's biting you here is the --skip-FOO did not used to be a fatal error.

--skip-FOO where 'FOO' is not valid is now fatal. To get the old warning-only behaviour, you need --loose-skip-FOO.

In your case, I suggest you start mysqld as follows:
mysqld --defaults-file=${EPREFIX}/etc/mysql/my.cnf

That will prevent it reading the OSX system one.

However, all of the mysql commandline tools are also going to read it unless you pass the same option, so consider changing it slightly too, unless you do actually have that socket at the weird location of /tmp/mysql.sock.
Comment 15 Fabian Groffen gentoo-dev 2010-06-12 21:00:55 UTC
if I understand this correctly, then it seems as if mysql from a prefix reads the host system config file, which means we have to fix that (possibly a patch) to make it look for the prefix config file instead
Comment 16 Florian CROUZAT (SuperFlo) 2010-07-21 21:20:01 UTC
Yes indeed. Looks like it.
Maybe adjusting variable when configuring, such as --prefix, --eprefix, or --sysconfdir=DIR (I found these running ./configure --help) but I'm no mysql expert and both the source and the ebuild look complicated, I won't take the risk to provide a patch.

ps: I remove mysql-bug@ge.org CC, looks like they aren't needed anymore. Thanks though, the --defaults-file option works fine.
pps: do we need to reopen the bug so that someone provides a patch ?