LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-05-2012, 12:11 PM   #1
darcistern
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Rep: Reputation: 0
MySQL table file ownership getting reset


I can't find any answers to this question which solve the problem.

When a table optimize is executed, on any table in any database, it causes the table to crash with the following output:

thetable optimize Error Table './db/thetable' is marked as crashed and last (automatic?) repair failed
db.thetable optimize Error Table 'thetable' is marked as crashed and last (automatic?) repair failed
db.thetable optimize error Corrupt

At which point I execute "repair table thetable;" and get this result:

db.thetable repair error 1 when fixing table
db.thetable repair Error Can't change ownership of the file '/var/lib/mysql/db/thetable.MYD' (Errcode: 1)
db.thetable repair status Operation failed

When I check the table files, there is now a TMD file with incorrect permissions:

-rwx------ 1 mysql mysql 10116 Aug 5 09:55 thetable.MYD
-rwx------ 1 mysql mysql 27648 Aug 5 09:59 thetable.MYI
-rwx------ 1 mysql 1000 10048 Aug 5 09:59 thetable.TMD
-rwx------ 1 mysql mysql 8808 Aug 5 09:10 thetable.frm


I have run: chmod -R 700 /var/lib/mysql/
and: chown -R mysql:mysql /var/lib/mysql/

But it seems the group ownership still gets reset to 1000 when running optimize.

Thanks,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing MYSQL table from text file wo column delimiters Latios Programming 3 06-13-2011 04:03 AM
MySQL: Incorrect key file for table ??? BrianK Programming 2 01-31-2007 11:00 AM
Can not insert word file into mysql table (in blob field) prabhatsoni Linux - Software 2 07-21-2006 05:01 AM
Recover a file saved in a mysql table via php upload prabhatsoni Linux - Software 0 07-13-2006 07:49 AM
How to import MS ACCESS Table including OLE filed into the MySQL Table ? myunicom Linux - General 1 11-28-2003 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration