Discussion:
How to fix not cleanly closed mysql?
(too old to reply)
Jeff Zhang
2006-09-07 03:50:07 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After an abnormally shutdow, /etc/init.d/mysql start givs the message:
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..

how to fix it? Need I rebuild all the databases?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFE/5TFexs2apGZoVgRAizOAJ4ofKhxiSCW1HGTdV/ABGJM8M6HbQCgyHoT
hiNRmOAHq+0yTKuQlLvxbFM=
=z43u
-----END PGP SIGNATURE-----
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Horacio Goetendia
2006-09-08 04:40:06 UTC
Permalink
Hi

I know two methods to repair

If you have MyISAM tables you can use:

To check:
myisamchk <the path of the myi file of your table>

To Repair:
myisamchk --recover <the path of the myi file of your table>
or with --safe-recover instead --recover

Also
There are some SQL sentences for MyISAM and InnoDB tables that can help you,
these are:

CHECK TABLE_NAME
REPAIR TABLE_NAME
**

Atte

Horacio Goetendia B.
Post by Jeff Zhang
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
how to fix it? Need I rebuild all the databases?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFE/5TFexs2apGZoVgRAizOAJ4ofKhxiSCW1HGTdV/ABGJM8M6HbQCgyHoT
hiNRmOAHq+0yTKuQlLvxbFM=
=z43u
-----END PGP SIGNATURE-----
--
with a subject of "unsubscribe". Trouble? Contact
--
Atentamente

Horacio Goetendia Bonilla
Jeff Zhang
2006-09-08 13:30:10 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Horacio Goetendia
Hi
I know two methods to repair
myisamchk <the path of the myi file of your table>
myisamchk --recover <the path of the myi file of your table>
or with --safe-recover instead --recover
Also
There are some SQL sentences for MyISAM and InnoDB tables that can help you,
CHECK TABLE_NAME
REPAIR TABLE_NAME
**
Atte
Horacio Goetendia B.
I purged mysql-server-5.0 and removed /var/lib/mysql/:

dpkg -P --force-all mysql-common mysql-client-5.0 mysql-server-5.0
mv /var/lib/mysql /tmp/
apt-get install mysql-common mysql-client-5.0 mysql-server-5.0
dpkg-reconfigure mysql-server-5.0

however, /etc/init.d/mysql restart still complain:
# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..

and:
# ps aux | grep mysql
root 8313 0.1 0.5 5644 1328 pts/3 S 21:16 0:00 /bin/sh
/usr/bin/mysqld_safe
mysql 8374 1.0 7.0 119580 18052 pts/3 Sl 21:16 0:00
/usr/sbin/mysqld --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 8375 0.0 0.2 4704 572 pts/3 S
21:16 0:00 logger -p
daemon.err -t mysqld_safe -i -t mysqld
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFAW+nexs2apGZoVgRAs4kAKCxyIRbob6P2skE6YgrCFJvWKhrbQCfcEn4
Ac4SXG6L/kpa5IExYYvYcgQ=
=4jwW
-----END PGP SIGNATURE-----
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Loading...