Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392361 - dev-db/mysql-5.5.16: config/mysql_install_db fails (via `emerge --config`)
Summary: dev-db/mysql-5.5.16: config/mysql_install_db fails (via `emerge --config`)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 413883
  Show dependency tree
 
Reported: 2011-11-29 07:06 UTC by Maurice Volaski
Modified: 2012-11-01 20:23 UTC (History)
11 users (show)

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 Maurice Volaski 2011-11-29 07:06:54 UTC
sudo emerge -v --config =dev-db/mysql-5.5.16

Configuring pkg...

 * Please provide a password for the mysql 'root' user now, in the
 * MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file.
 * Avoid ["'\_%] characters in the password
    >
 * Retype the password
    >
 * ERROR: dev-db/mysql-5.5.16 failed (config phase):
 *   Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND /var/tmp/portage/dev-db/mysql-5.5.16/temp/mysql_install_db.log
 * 
 * Call stack:
 *     ebuild.sh, line   84:  Called pkg_config
 *   environment, line 3564:  Called mysql-v2_pkg_config
 *   environment, line 3228:  Called die
 * The specific snippet of code:
 *           die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log";
----------------------------------------------------

The log files never get created.

Manually running it
/usr/share/mysql/scripts/mysql_install_db --basedir=/usr
also fails, so there is probably a separate upstream bug as well.

emerge --info
Portage 2.1.10.38 (default/linux/amd64/10.0/server, gcc-4.5.3, glibc-2.14.1-r0, 3.1.2-gentoo x86_64)
=================================================================
System uname: Linux-3.1.2-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5462_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Sun, 27 Nov 2011 06:00:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.7-r2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1-r1
sys-devel/binutils:       2.22
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.14.1
Repositories: gentoo mysql perl-experimental science x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/mysql /var/lib/layman/perl-experimental /var/lib/layman/science /config/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="\ acl amd64 apache2 bzip2 cli cracklib ctype curl cxx dri ftp gd iconv innodb java jpeg jpeg2k logrotate mmx modules multilib ncurses nls noaudio nojoystick nolvm1 nptl nptlonly pam pcre pppd pygrub readline rsync samba session snmp sse sse2 ssl suexec sysfs syslog unicode vchroot vhosts xml zlib" ALSA_PCM_PLUGINS="mmap_emul" APACHE2_MODULES="actions alias auth_basic auth_digest authn_default authn_file authz_default authz_host authz_user autoindex cache cgi dir disk_cache env ext_filter file_cache filter ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel mach64 nouveau r128 radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Daniel Douglas 2011-12-06 21:30:20 UTC
5.5.18 from the overlay fails this as well. This also causes digikam to fail during configure.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-12-06 21:38:45 UTC
Can you poke the manual version more, perhaps with verbose?
Other options to try:
--force
--skip-name-resolve
--no-defaults
Comment 3 Francesco Riosa 2011-12-07 01:42:10 UTC
seem to recall that 5.5 `mysql_upgrade` does not work if $PWD != /usr may be it's a problem with paths?
Comment 4 Marcin Mirosław 2011-12-19 12:10:12 UTC
The same with 5.5.19 (from tree):
/usr/share/mysql/scripts/mysql_install_db 

FATAL ERROR: Could not find ./bin/my_print_defaults

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
Comment 5 Nilesh Govindrajan 2012-01-05 03:06:23 UTC
(In reply to comment #4)
> The same with 5.5.19 (from tree):
> /usr/share/mysql/scripts/mysql_install_db 
> 
> FATAL ERROR: Could not find ./bin/my_print_defaults
> 
> If you compiled from source, you need to run 'make install' to
> copy the software into the correct location ready for operation.
> 
> If you are using a binary release, you must either be at the top
> level of the extracted archive, or pass the --basedir option
> pointing to that location.

I just stumbled across this error in dev-db/mysql-5.5.16 and 5.5.19; the ebuild doesn't seem to install mysql_install_db in /usr/bin, it's present in /usr/share/mysql/scripts/ though.

The emerge --config command fails, but I ran /usr/share/mysql/mysql_install_db --basedir=/usr --user=mysql, and it does work.
Comment 6 David Carlos Manuelda 2012-05-09 15:42:53 UTC
This bug still applies to =dev-db/mysql-5.5.22-r1
Comment 7 Edmar Wiggers 2012-06-05 03:13:24 UTC
The workaround mentioned in comment #5 works (mysql-5.5.22-r1). 
Complete command with correct path:

/usr/share/mysql/scripts/mysql_install_db --basedir=/usr --user=mysql
Comment 8 gentoo 2012-06-21 16:30:39 UTC
Thanks for the workaround, i'll try that.

Just confirmed bug is still present in mariadb-5.5.23
Comment 9 Brian Evans (RETIRED) gentoo-dev 2012-08-06 19:57:12 UTC
(In reply to comment #7)
> The workaround mentioned in comment #5 works (mysql-5.5.22-r1). 
> Complete command with correct path:
> 
> /usr/share/mysql/scripts/mysql_install_db --basedir=/usr --user=mysql

A better solution may be to add the following to my.cnf on install:
[mysql_install_db]
basedir={$EPREFIX}/usr
Comment 10 François Valenduc 2012-09-30 13:07:55 UTC
This bug still occurs with mysql 5.5.27. Why is the status not changed to confirmed.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-11-01 20:23:20 UTC
Fixed in CVS now.