From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1Dw7Xa-0007vi-D0 for garchives@archives.gentoo.org; Sat, 23 Jul 2005 00:06:55 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j6N05Q0J032530; Sat, 23 Jul 2005 00:05:26 GMT Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j6N01lTA004961 for ; Sat, 23 Jul 2005 00:01:47 GMT Received: by rproxy.gmail.com with SMTP id a41so13114rng for ; Fri, 22 Jul 2005 17:02:19 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=ndvOXJoXNNXuM+DfrojG07+eIX+p0mlWMcAgV/cS7l3fI53V0agJrVwW0NbB5siCBUjXASb3RrObn60LEE2SRGjuTMAY4fmWSAHCXeFdINIvvDm1ndAexNJce81k34Fm3cQJ1PTN8ogUGYnRAtOlqHZn9PzTO7BykHAGetL7Zf0= Received: by 10.38.13.2 with SMTP id 2mr445321rnm; Fri, 22 Jul 2005 17:02:19 -0700 (PDT) Received: from gentoo.localdomain.local ([68.198.67.91]) by mx.gmail.com with ESMTP id f3sm618655rne.2005.07.22.17.02.19; Fri, 22 Jul 2005 17:02:19 -0700 (PDT) From: Patrick Rutkowski To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] MySQL Run Script Weirdness Date: Fri, 22 Jul 2005 20:02:17 -0400 User-Agent: KMail/1.8.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507222002.17497.rutski89@gmail.com> X-Archives-Salt: 73961f81-8dd8-4ff1-aaa6-5e8bd5900d2c X-Archives-Hash: b71b65fd026d579edddda66e8e28a60b THIS POST IS MORE LEGIBLE ON THE FORUMS: http://forums.gentoo.org/viewtopic-p-2594528.html#2594528 /etc/init.d/mysql is acting very strangely on a fresh mysql (4.0.25-r2). I've tried to install the stable version as well, but I get the same nonsense. Floow along and you'll see what I mean. No previous instances of mysql are running: [code] localhost mysql # ps -A | grep sql localhost mysql # [/code] When I run the mysql init script I get a failed symbol, with only a reference to /etc/mysql/my.cnf; this isn't very useful debugging info... [code] localhost mysql # /etc/init.d/mysql start * Caching service dependencies ... [ ok ] * Starting mysqld (/etc/mysql/my.cnf) ... [ !! ] localhost mysql # [/code] So, I go check out the logs; again, not very much useful debugging info. [code] localhost mysql # pwd /var/log/mysql localhost mysql # ls mysql.err mysqld.err localhost mysql # cat mysql.err 050722 19:41:24 mysqld started localhost mysql # cat mysqld.err 050722 19:41:24 InnoDB: Database was not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 43892 InnoDB: Doing recovery: scanned up to log sequence number 0 43892 050722 19:41:24 InnoDB: Flushing modified pages from the buffer pool... 050722 19:41:24 InnoDB: Started /usr/sbin/mysqld: ready for connections. Version: '4.0.25' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-4.0.25-r2 localhost mysql # [/code] There's probably no debugging useful debugging info because mysql started just fine :roll: [code] localhost mysql # ps -A | grep mysql 909 ? 00:00:00 mysqld_safe 948 ? 00:00:00 mysqld localhost mysql # [/code] I can connect to mysql without issue as well: [code] localhost mysql # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 4.0.25 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> quit Bye localhost mysql # [/code] I might be inclined to not care and just continue development; but.... [code] localhost mysql # /etc/init.d/mysql stop * ERROR: "mysql" has not yet been started. localhost mysql # [/code] The fact that I can't use the runscript to stop the proess gets to me... I'm itching to fix this. Here is the /etc/mysql/my.cnf file with comments grep'd out: [code] localhost mysql # grep -v '^#' /etc/mysql/my.cnf [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [safe_mysqld] err-log = /var/log/mysql/mysql.err [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock log-error = /var/log/mysql/mysqld.err basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english skip-locking set-variable = key_buffer=16M set-variable = max_allowed_packet=1M set-variable = thread_stack=128K bind-address = 127.0.0.1 port = 3306 set-variable = innodb_buffer_pool_size=32M set-variable = innodb_additional_mem_pool_size=1M innodb_data_home_dir = /var/lib/mysql/ innodb_log_arch_dir = /var/lib/mysql/ innodb_log_group_home_dir = /var/lib/mysql/ innodb_data_file_path = ibdata1:10M:autoextend:max:128M set-variable = innodb_log_file_size=8M set-variable = innodb_log_buffer_size=1M set-variable = innodb_log_files_in_group=2 innodb_flush_log_at_trx_commit=1 [mysqldump] quick set-variable = max_allowed_packet=1M [mysql] [isamchk] set-variable = key_buffer=16M localhost mysql # [/code] Here is the run script in question. Also, before installing mysql, I made sure that there was no previous /etc/init.d/mysql file; so, this is surly the runscript created by the fresh mysql-4.0.25-r2 emerge. [code]localhost mysql # cat /etc/init.d/mysql #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/mysql-4.0.24-r2.rc6,v 1.1 2005/05/17 09:08:46 robbat2 Exp $ depend() { use dns net } getconfig() { MY_CNF=${MY_CNF=/etc/mysql/my.cnf} if [ ! -f ${MY_CNF} ]; then eerror "No ${MY_CNF} file exists! Using automatic defaults!" fi #dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` #dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` local mysqld_cnf="`my_print_defaults --config-file=${MY_CNF} mysqld`" datadir=`echo "${mysqld_cnf}" | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` pidfile=`echo "${mysqld_cnf}" | sed -ne '/pid-file/s|^--pid-file=||p' | tail -n1` basedir=`echo "${mysqld_cnf}" | sed -ne '/basedir/s|^--basedir=||p' | tail -n1` socket=`echo "${mysqld_cnf}" | sed -ne '/socket/s|^--socket=||p' | tail -n1` # push these out to the script export MY_CNF export pidfile export datadir export basedir export socket } checkconfig() { getconfig if [ -z "${datadir}" ]; then eerror "Your mysql doesn't have any datadir setting, default or specific" eerror "Please check your my.cnf : ${MY_CNF}" return 1 fi if [ ! -d "$datadir/mysql" ]; then eerror "You don't appear to have the mysql database installed yet." eerror "Please run /usr/bin/mysql_install_db to have this done..." return 1 fi } start() { local retstatus=1 local maxtry=5 getconfig checkconfig || return 1 ebegin "Starting mysqld (${MY_CNF})" start-stop-daemon --start --quiet --background \ --exec "${basedir}/bin/mysqld_safe" \ -- --defaults-file=${MY_CNF} >/dev/null 2>&1 retstatus=$? while ! [[ -S "${socket}" || "${maxtry}" -lt "1" || "${retstatus}" -gt "0" ]] ; do maxtry=$(($maxtry-1)) echo -n "." sleep 1 done ! [[ -S "${socket}" ]] && eerror "MySQL NOT started, proceding anyway" eend $retstatus } stop () { getconfig ebegin "Stopping mysqld (${MY_CNF})" start-stop-daemon --stop --retry 5 --quiet --pidfile=${pidfile} eend $? } localhost mysql # [/code] I really hope that someone can help me fix this. -- gentoo-user@gentoo.org mailing list