Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463332 - dev-db/mysql: /etc/init.d/mysql: reporting my_print_defaults error not found without ${MY_SUFFIX}
Summary: dev-db/mysql: /etc/init.d/mysql: reporting my_print_defaults error not found ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-26 09:45 UTC by Ivan Grushin
Modified: 2013-04-28 03:27 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 Ivan Grushin 2013-03-26 09:45:34 UTC
Tried to start second copy of MySQL on server, configured slot_2 in standalone /etc/conf.d/mysql-2 file.
Start of mysql service failed with error text "my_print_defaults NOT found or not executable" with no traces of slot info.

Please patch /etc/init.d/mysql -- either change text of error from "my_print_defaults NOT found or not executable" to "my_print_defaults${MY_SUFFIX} NOT found or not executable", or make some workaround on running my_print_defaults for different slots.
Comment 1 Ivan Grushin 2013-03-26 09:50:06 UTC
Portage 2.1.11.50 (default/linux/amd64/13.0, gcc-4.4.5, glibc-2.12.2, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-Intel-R-_Xeon-R-_CPU_E5507_@_2.27GHz-with-gentoo-2.0.2
KiB Mem:    16456564 total,   6328072 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Mon, 25 Mar 2013 19:00:01 +0000
ld GNU ld (GNU Binutils) 2.20.1.20100303
ccache version 2.4 [disabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.2.10
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo intrice x-portage
Installed sets: @intrice.nagios
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/intrice /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bash-completion berkdb bzip2 cli cracklib crypt ctype cxx dri expat fontforge fortran fuse gd gdbm geoip gif gpm iconv imap innodb java jpeg jpeg2k libwww logrotate mime mmx modules mudflap multilib mysqli ncurses nls nobcel nomotif nptl openmp pam pcre php png postgres readline ruby sasl session slang sse sse2 ssl tcpd truetype unicode vhosts xml xsl zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets 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" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Ivan Grushin 2013-03-26 09:53:41 UTC
Created /etc/conf.d/mysql-2, modified it to has port=3307 and another datadir, linked /etc/init.d/mysql-2 to /etc/init.d/mysql, linked /usr/bin/my_print_defaults to /usr/bin/my_print_defaults-2

Tried to start /etc/init.f/mysql-2. Error:
 * "/var/run/mysqld/mysqld.pid" is still present and the process is running.
 * Please stop it "kill 26686" maybe ?
 * ERROR: mysql failed to start

Please edit /etc/init.d/mysql and tie SVCNAME to PID filename.
Comment 3 Ivan Grushin 2013-03-26 09:57:16 UTC
Concerning the last message on PID for /etc/init.d/mysql.
current string:
pidfile="${pidfile:-"/var/run/mysqld/mysqld${MY_SUFFIX}.pid"}"
should be changed (IMHO) with:
pidfile="${pidfile:-"/var/run/mysqld/mysqld${MY_SUFFIX}.${SVCNAME}.pid"}"
Comment 4 Brian Evans (RETIRED) gentoo-dev 2013-03-26 14:20:47 UTC
(In reply to comment #2)
> Created /etc/conf.d/mysql-2, modified it to has port=3307 and another
> datadir, linked /etc/init.d/mysql-2 to /etc/init.d/mysql, linked
> /usr/bin/my_print_defaults to /usr/bin/my_print_defaults-2
 
Incomplete change in config.  You also need to change socket, pidfile and possibly other variables so instances do not collide.

Example of a working alt-config:

/etc/conf.d/mysql.3307
-------------------------
# If you want a non-stock location for the config file, uncomment or update
# either of these as needed. If you do use it, you must make sure that none of
# your socket, pidfile, datadir, logfiles, binary logs, relay logs or InnoDB
# files collide with each other.
MY_CNF="/etc/mysql/my.3307.cnf"


in /etc/mysql/my.3307.cnf:
---------------------------
socket      = /var/run/mysqld/mysqld.3307.sock
pid-file    = /var/run/mysqld/mysqld.3307.pid
log-error   = /var/log/mysql/mysqld.3307.err
datadir     = /var/lib/mysql/3307
Comment 5 Brian Evans (RETIRED) gentoo-dev 2013-03-26 17:43:19 UTC
Also which version of mysql-init-scripts are you running? The current stable is dev-db/mysql-init-scripts-2.0_pre1-r2 on most common arches.

It sounds like you are using the ancient 1.2 init scripts which are 6 years old.
Please update the latest init scripts and follow the new conf.d info.