View previous topic :: View next topic |
Author |
Message |
Snyke n00b
Joined: 01 Nov 2006 Posts: 37
|
Posted: Mon Nov 06, 2006 5:21 pm Post subject: [solved]Help, I broke my MySQL |
|
|
Ok I'm a newbie, I know but I need this back working as fast as possible: I updated MySQL a few days ago and it worked nicely, at first but then today I noticed some strange data in my database (hundreds of NULL values where there shouldn't be anything) and I thought about restarting it, anyway it just won't start anymore
/var/log/mysql/mysqld.err:
Quote: | 061106 18:04:01 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
061106 18:04:01 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43902.
InnoDB: Doing recovery: scanned up to log sequence number 0 43902
061106 18:04:01 InnoDB: Flushing modified pages from the buffer pool...
061106 18:04:01 InnoDB: Started; log sequence number 0 43902
061106 18:04:01 [Warning] './mysql/host' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
061106 18:04:01 [Warning] './mysql/user' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
061106 18:04:01 [Warning] './mysql/db' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
061106 18:04:01 [ERROR] Fatal error: mysql.user table is damaged or in unsupported 3.20 format. |
Any hints what I might do to fix it?
Last edited by Snyke on Mon Nov 06, 2006 7:16 pm; edited 1 time in total |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Mon Nov 06, 2006 5:46 pm Post subject: |
|
|
Updated mysql?? From 3.x to 4.x perhaps?
Did you follow this guide? _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
Snyke n00b
Joined: 01 Nov 2006 Posts: 37
|
Posted: Mon Nov 06, 2006 5:57 pm Post subject: |
|
|
No idea what MySQL version I had before, but I think it had to be a 4.x.x version. The problem is that during the update the daemon might have been running (/me blushes for his stupidity), I need only the 4.1.21 version.
I now have backups of all my files but off course they are useless if I can't use them in the new version. I hope that it's only the user table having problems. |
|
Back to top |
|
|
Snyke n00b
Joined: 01 Nov 2006 Posts: 37
|
Posted: Mon Nov 06, 2006 5:59 pm Post subject: |
|
|
OK maybe this helps: the old my.cnf file has the following header:
Quote: | # $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.0.24-r1,v 1.1 2005/03/13 05:54:00 robbat2 Exp $ |
So I guess that the old version was 4.0.24. |
|
Back to top |
|
|
Snyke n00b
Joined: 01 Nov 2006 Posts: 37
|
Posted: Mon Nov 06, 2006 6:19 pm Post subject: |
|
|
Could it possibly be that this is simply a matter of character encodings? It complains about multibyte characters and the new config file has some charset definitions added (mainly utf8). I wasn't bothered at first but it may just be the needed clue... |
|
Back to top |
|
|
Snyke n00b
Joined: 01 Nov 2006 Posts: 37
|
Posted: Mon Nov 06, 2006 7:15 pm Post subject: |
|
|
Ok got it worked out, just had to delete the mysql database and then reinstall the basic table. The data is still a bit jumbled but nothing that a bit of sed-ing on the dumps couldn't fix ^^ |
|
Back to top |
|
|
svozil n00b
Joined: 23 Sep 2005 Posts: 13
|
Posted: Mon Nov 12, 2007 8:16 pm Post subject: |
|
|
Advice taken from http://www.openthought.org/?MySQLErrors:
Just execute these commands:
* mysqld_safe --skip-grant-tables --user=root &
* mysql_fix_privilege_tables
* pkill mysqld
* /etc/init.d/mysql start |
|
Back to top |
|
|
|