Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MySQL Database corruption
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
gouranga
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2005
Posts: 113

PostPosted: Wed Jun 28, 2006 10:36 am    Post subject: MySQL Database corruption Reply with quote

The log show that there are some problems
Basicly there are 3 problems:
- Can't open file
- Can't find file
- Got error 134 when reading table

Can someone explain to me what is causing these errors?
Before the update to mysql-4.0.27 everything was working fine. I never encountered these errors.
Now my databases are down every 2 days because of corruption.

Can a full hard disk have caused a problem?
After mysqlrepair everything works back except some tables that are just "lost".
I find this very strange.
What's causing the tables to not be readable anymore?

One table is realy messed up and don't want to be repaired?
I tried mysqlrepair and repair table.
But I keep getting "Can't find file: 'userson.MYI' (errno: 2)"
How do I solve this best?
Drop and recreate?

Code:
060624 12:15:40 /usr/sbin/mysqld: Can't open file: 'phpbb_sessions_keys.MYI'. (errno: 145)
060624 21:00:02 /usr/sbin/mysqld: Can't open file: 'verbruik.MYI'. (errno: 145)
060625  0:18:20 /usr/sbin/mysqld: Normal shutdown

060625  0:18:21 /usr/sbin/mysqld: Shutdown Complete

/usr/sbin/mysqld: ready for connections.
Version: '4.0.27'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-4.0.27
060625  9:38:22 /usr/sbin/mysqld: Normal shutdown

060625  9:38:22 /usr/sbin/mysqld: Shutdown Complete

/usr/sbin/mysqld: ready for connections.
Version: '4.0.27'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-4.0.27
060625 16:39:47 /usr/sbin/mysqld: Normal shutdown

060625 16:39:48 /usr/sbin/mysqld: Shutdown Complete

/usr/sbin/mysqld: ready for connections.
Version: '4.0.27'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-4.0.27
060628 12:11:47 /usr/sbin/mysqld: Can't find file: 'userson.MYI' (errno: 2)
060628 12:11:47 /usr/sbin/mysqld: Can't find file: 'userson.MYI' (errno: 2)
060628 12:17:17 read_next: Got error 134 when reading table ./hogepimp/phpbb_sessions
060628 12:17:17 read_next: Got error 134 when reading table ./hogepimp/phpbb_sessions
060628 12:17:17 read_next: Got error 134 when reading table ./hogepimp/phpbb_sessions
060628 12:17:17 read_next: Got error 134 when reading table ./hogepimp/phpbb_sessions
060628 12:17:17 read_next: Got error 134 when reading table ./hogepimp/phpbb_sessions
060628 12:17:34 /usr/sbin/mysqld: Can't find file: 'userson.MYI' (errno: 2)
060628 12:18:32 /usr/sbin/mysqld: Can't find file: 'userson.MYI' (errno: 2)
060628 12:18:40 /usr/sbin/mysqld: Can't find file: 'userson.MYI' (errno: 2)
060628 12:23:12 /usr/sbin/mysqld: Can't find file: 'userson.MYI' (errno: 2)
060628 12:23:12 /usr/sbin/mysqld: Can't find file: 'userson.MYI' (errno: 2)
Back to top
View user's profile Send private message
!equilibrium
Bodhisattva
Bodhisattva


Joined: 06 Jun 2004
Posts: 2109
Location: MI/BG/LC

PostPosted: Wed Jun 28, 2006 1:08 pm    Post subject: Re: MySQL Database corruption Reply with quote

gouranga wrote:
Before the update to mysql-4.0.27 everything was working fine. I never encountered these errors.


you have upgraded from 3.x to 4.x ?
you know that mysql major releases are not retro-compatible? you need to manually dump the DBs to be able to import it into the new release.
_________________
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
Back to top
View user's profile Send private message
gouranga
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2005
Posts: 113

PostPosted: Thu Jun 29, 2006 9:00 am    Post subject: Reply with quote

I think I located the problem.

I once accidentally updated to version 4.1.19.
After that I downgraded back to 4.0.27.

I think I skyped the dump and import data part :oops:
Maybe that caused the problem.

Code:
 * dev-db/mysql

     Tue Mar  8 20:53:30 2005 >>> dev-db/mysql-4.0.22-r2
     Sat Mar 19 22:50:21 2005 >>> dev-db/mysql-4.0.24
     Sat May 13 10:07:29 2006 >>> dev-db/mysql-4.1.19
     Sun May 14 01:47:38 2006 >>> dev-db/mysql-4.0.27


The question is ...how do I fix this?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum