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

Bug 402545

Summary: dev-db/mysql-5.1.61 / =dev-db/mysql-init-scripts-2.0_pre1-r2 - restart and stop do not work?
Product: Gentoo Linux Reporter: tanstaafl <tanstaafl>
Component: [OLD] ServerAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED OBSOLETE    
Severity: normal CC: grknight
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description tanstaafl@libertytrek.org 2012-02-07 16:16:37 UTC
This has been an ongoing problem for a while now.

I first posted a thread for this on the gentoo-user list when I noticed this problem after upgrading the mysql-init-scripts to 2.0_pre1-r2:

http://www.gossamer-threads.com/lists/gentoo/user/246199

No real answers there, and now I'm still having this problem after updating mysql from 5.1.56 to 5.1.61.

(emerge --info at bottom of this post)

first, restart attempt (what I normally do after an upgrade) fails:

myhost : Sun Feb 05, 13:55:48 : ~
 # /etc/init.d/mysql restart
 * Caching service dependencies ...                                                                                                   [ ok ]
 * Starting mysql ...
 * start-stop-daemon: /usr/sbin/mysqld is already running                                                                             [ !! ]
 * ERROR: mysql failed to start
myhost : Sun Feb 05, 13:55:53 : ~
 # 

Next, trying to simply STOP mysql fails in similar fashion:

myhost : Sun Feb 05, 13:55:53 : ~
 # /etc/init.d/mysql stop
 * WARNING: mysql is already stopped
moria : Sun Feb 05, 13:56:49 : ~
 # 

But it isn't stopped, as you can see, it is running - but it is the old version (but the mysqladmin command is apparently  the new version as you can see):

myhost : Sun Feb 05, 14:05:05 : ~
 # mysqladmin -u root -p version
Enter password:
mysqladmin  Ver 8.42 Distrib 5.1.61, for pc-linux-gnu on x86_64
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version          5.1.56-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 25 days 7 hours 45 min 17 sec

Threads: 4  Questions: 708143  Slow queries: 0  Opens: 139  Flush tables: 1  Open tables: 57  Queries per second avg: 0.323
myhost : Sun Feb 05, 14:05:20 : ~
 #

Also - since there is no entry for mysql in rc-update output, how/why does it successfully start up at boot?

Also - shouldn't it be mysqld for the init script, not mysql?

I'm totally confused here (obviously)...

So, can someone please either tell me what I'm missing, doing wrong, or help me get this fixed?

Thanks,

Charles

myhost : Sun Feb 05, 13:40:34 : ~
 # emerge --info
Portage 2.1.10.44 (default/linux/amd64/10.0/server, gcc-4.5.3, glibc-2.13-r4, 3.0.6-gentoo x86_64)
=================================================================
System uname: Linux-3.0.6-gentoo-x86_64-AMD_Opteron-tm-_Processor_244-with-gentoo-2.0.3
Timestamp of tree: Sun, 05 Feb 2012 15:00:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.7.9-r2, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo sunrise gnustep mbi-local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -O2"
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/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="-march=opteron -O2"
DISTDIR="/usr/portage/distfiles"
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://mirror.datapipe.net/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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/sunrise /var/lib/layman/gnustep /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cups curl cxx dovecot-sasl dri fam fortran gd gdbm gpm iconv mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre pppd readline sasl session snmp sse sse2 ssl sysfs tcpd truetype unicode vhosts xml xorg zlib" 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="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" 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" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic 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, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

myhost : Sun Feb 05, 14:17:39 : ~
 #
Comment 1 Brian Evans (RETIRED) gentoo-dev 2012-07-19 19:34:47 UTC
Did you update your conf.d files to the new format?
You must disregard all previous conf.d formats with mysql-init-scripts-2*
Just make a backup of them until you convert over.

The default layout is here: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/mysql-init-scripts/files/mysql-5.1.53-conf.d?revision=1.2

The current init scripts changed the way instances work.
If you want multiple instances, you create a symlink of the init.d file to say mysql.3307 and copy the base /etc/conf.d/mysql to /etc/conf.d/mysql.3307 and make changes in the new file.
Other packages use this "feature" to make management of instances easier as well.

Compare your conf.d to the link above and get back to us on this bug.
Comment 2 tanstaafl@libertytrek.org 2012-07-19 20:01:19 UTC
(In reply to comment #1)
> Did you update your conf.d files to the new format?

Of course... I always run etc-update after emerging and carefully update all config files.

But it is no longer an issue as the last update magically fixed things (it is now stopping/starting/restarting fine)...

Thanks though...