LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-01-2007, 06:57 AM   #1
c0c0deuz
Member
 
Registered: Aug 2001
Location: Qc, Canada
Distribution: RedHat, Mandrake, FreeEOS
Posts: 336

Rep: Reputation: 30
fixing mysql database table without phpmyadmin


I have filled my disk completelly and i damaged my phpwebgallery_images table.
I now reduce the amount of pictre on the disk but the database is now giving an error:
SELECT path, tn_ext
FROM phpwebgallery_categories AS c INNER JOIN phpwebgallery_images AS i
ON i.id = c.representative_picture_id
WHERE uppercats REGEXP '(^|,)1(,|$)'
ORDER BY RAND()
LIMIT 0,1
;
[mysql error 1016] Can't open file: 'phpwebgallery_images.MYI' (errno: 145)

i am using a free eos server 1.3 and it doesn't use phpmyadmin, how can i fix my table with mysql?
 
Old 12-01-2007, 08:24 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Does phpwebgallery_images.MYI even exist in /var/lib/mysql directory? You can try to repair the table but from the sounds of the error, you're probably best off to reload from a backup. No backups and repair doesn't work you say, well, looks like you'll be redoing your gallery and after you're done, setup a good backup plan for the database..

You can try to repair a table with the following SQL:

mysql> REPAIR TABLE phpwebgallery_images;

That's if the table name is called phpwebgallery_images
 
Old 12-01-2007, 08:25 AM   #3
0.o
Member
 
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208

Rep: Reputation: 35
myisamchk --check /var/lib/mysql/phpwebgallery_images.MYI once that is done it will give you a summary of the issues. Then you can run myisamchk --safe-recover /var/lib/mysql/phpwebgallery_images.MYI
 
Old 12-01-2007, 08:17 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by 0.o View Post
myisamchk --check /var/lib/mysql/phpwebgallery_images.MYI once that is done it will give you a summary of the issues. Then you can run myisamchk --safe-recover /var/lib/mysql/phpwebgallery_images.MYI
Remember though, that will only work if the file actually exists..
 
  


Reply



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
fixing a partition table on new hard drive demerson3 Linux - Newbie 18 12-18-2019 05:14 PM
Need help fixing the partition table Hungry ghost Linux - Newbie 2 02-08-2005 01:52 PM
Fixing a bad partition table pen^2 Linux - General 2 07-21-2004 06:25 AM
MySQL / phpMyAdmin - Can only see test table after granting proper privelages.. Transition Linux - Software 2 02-03-2004 12:45 PM
Fixing An Incorrect Partition Table? Leben Linux - Hardware 6 01-25-2003 01:43 PM

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

All times are GMT -5. The time now is 08:06 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