Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626186 - dev-db/mysql-init-scripts-2.2 passes unsupported flag "--mysqld" to my_print_defaults
Summary: dev-db/mysql-init-scripts-2.2 passes unsupported flag "--mysqld" to my_print_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-26 05:14 UTC by Hank Leininger
Modified: 2017-07-26 17:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hank Leininger 2017-07-26 05:14:37 UTC
After upgrading to current dev-db/mysql-5.6.37 and dev-db/mysql-init-scripts-2.2 , /etc/init.d/mysql start fails with:

my_print_defaults: unknown option '--mysqld'
/etc/init.d/mysql: line 183: /sbin/mysqld: No such file or directory
 * mysql config check failed                                       [ !! ]
 * ERROR: mysql failed to start

Turns out this is because a call to my_print_defaults that recently changed:

dev-db/mysql-init-scripts/files $ egrep my_print_defaults init.d-2.[02]
init.d-2.0:     my_print_defaults --config-file="$1" mysqld |
init.d-2.2:     my_print_defaults --defaults-file="$1" --mysqld |

If you just try to run as shown, it'll error:
# my_print_defaults --defaults-file=/etc/mysql/my.cnf --mysqld
my_print_defaults: unknown option '--mysqld'

The correct usage is with 'mysql', not '--mysql':
# my_print_defaults --defaults-file=/etc/mysql/my.cnf mysqld
--[snip]

Looks like init.d-2.2 had that change when first checked in.  Perhaps some other version/flavor of mysql provides a my_print_defaults that supports --mysqld , but dev-db/mysql-5.6.37 definitely does not.

Rolled back to dev-db/mysql-init-scripts-2.1-r1 and mysqld can start again.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2017-07-26 13:17:19 UTC
(In reply to Hank Leininger from comment #0)
> Looks like init.d-2.2 had that change when first checked in.  Perhaps some
> other version/flavor of mysql provides a my_print_defaults that supports
> --mysqld , but dev-db/mysql-5.6.37 definitely does not.
> 
> Rolled back to dev-db/mysql-init-scripts-2.1-r1 and mysqld can start again.

You are correct, this option exists in mariadb but not mysql/percona.  I wish it did because it limits what can be searched instead of what the server supports.

Anyway, fixed with 2.2-r1 and the addition of the supervise script (openrc-supervise to automatically restart).
Comment 2 Hank Leininger 2017-07-26 17:10:26 UTC
Thanks for the quick attention/fix!