View previous topic :: View next topic |
Author |
Message |
yamakawa Guru
Joined: 28 Jul 2003 Posts: 340
|
Posted: Sun May 08, 2005 3:25 pm Post subject: mysql startup/shutdown status problem |
|
|
Using MySQL 4.0.24-r1, I have a problem with the init script. Whenever MySQL starts functionally, it always shows [!!] for its status. As a result, shutdown is not done very well, because MySQL is not thought to be running without trouble.
Looking into /var/log/mysql/mysqld.err I found the following entry: Code: |
050508 20:08:01 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
050508 20:08:02 InnoDB: Flushing modified pages from the buffer pool...
050508 20:08:02 InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.24' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-4.0.24-r1 |
this indicates there is misconfiguration on InnoDB. Then I disabled InnoDB function in /etc/mysql/my.cnf:
Code: | [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
key_buffer=16M
max_allowed_packet=1M
thread_stack=128K
bind-address = 127.0.0.1
port = 3306
skip-networking
skip-innodb <---- HERE
[mysqldump]
quick
max_allowed_packet=1M
[mysql]
[isamchk]
key_buffer=16M |
With this my.cnf MySQL still runs perfectly! The error entry in /var/log/mysql/mysqld.err disappeared. There is no error in /var/log/mysql/mysql.err either. Yet the status shows [!!] when I try to startup MySQL.
After "successful" startup,
Code: | # ps aux | grep mysql
root 15256 0.0 0.5 3540 1408 ? Ss 00:00 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/mysql/my.cnf
mysql 15308 0.0 2.4 40244 6148 ? Sl 00:00 0:00 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root 15862 0.0 0.3 2712 768 pts/2 S+ 00:14 0:00 grep mysq |
Now I ended up with modifying the init.d script to get "fake" [ok] status:
Code: | start() {
getconfig
checkconfig || return 1
ebegin "Starting mysqld (${MY_CNF})"
start-stop-daemon --start --quiet --background \
--exec /usr/bin/mysqld_safe \
-- --defaults-file=${MY_CNF} >/dev/null 2>&1
#eend $?
eend 0
}
stop () {
getconfig
ebegin "Stopping mysqld (${MY_CNF})"
start-stop-daemon --stop --retry 5 --quiet --pidfile=${pidfile}
eend $?
} |
But I know this is quite bad idea. What should I do with this?
P.S. Before 4.0.24-r1, 4.0.23-r2, 4.0.23-r1, 4.0.23 and so forth did not have such a problem. |
|
Back to top |
|
|
yamakawa Guru
Joined: 28 Jul 2003 Posts: 340
|
Posted: Sun May 08, 2005 3:42 pm Post subject: |
|
|
Found a similar situation here: https://bugs.gentoo.org/show_bug.cgi?id=90471.
But the fix patch too gives me [!!] status.
With "sleep 3" fix, it goes well.
Code: | start() {
getconfig
checkconfig || return 1
ebegin "Starting mysqld (${MY_CNF})"
start-stop-daemon --start --quiet --background \
--exec /usr/bin/mysqld_safe \
-- --defaults-file=${MY_CNF} >/dev/null 2>&1
sleep 3;
eend $?
} |
Any better idea out there? |
|
Back to top |
|
|
yamakawa Guru
Joined: 28 Jul 2003 Posts: 340
|
Posted: Sun May 08, 2005 3:50 pm Post subject: |
|
|
Found some more reports and so to call "solution" here: https://bugs.gentoo.org/show_bug.cgi?id=85095
But it won't work either.
I have the latest portage tree and did:
Code: | # cp /usr/portage/dev-db/mysql/files/mysql-4.0.24-r1.rc6 /etc/init.d/mysql
# chmod +x /etc/init.d/mysql |
Yet I get the same result of [!!] |
|
Back to top |
|
|
|