Gossamer Forum
Home : General : Databases and SQL :

MySQLDump problem..

(Page 1 of 2)
> >
Quote Reply
MySQLDump problem..
I've got this really annoying problem now with MySQLDump. For some reason I'm getting the following error when trying to use mysqldump to backup a Databasel

/usr/local/mysql/bin/mysqldump: Can't get CREATE TABLE for table 'error_log' (Can't find file: 'error_log.MYD' (errno: 2))

It only seems to be doing it on Links_SQL databases...and nothing else. Anyone got any ideas?

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
It looks like you database is a bit buggered.

cd to your mysql directory and check if the file is there or not. You may need to run myisamchk...otherwise it looks like something happened to your MYD file
Quote Reply
Re: [Paul] MySQLDump problem.. In reply to
LOL..where woudl the databases normally be?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Paul] MySQLDump problem.. In reply to
MMm..database really does look a bit messed up!

EDIT: Never mind..I was doing a repair on *.MYD files, and not *.MYI Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Jun 24, 2002, 9:48 AM
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
Time to repair your tables, son. =)

- wil
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
Ok, I've repaired my *.MYI files, but it looks like its the *.MYD files that need fixing. Anyone ever had to do this, and if so, could you show me how? I can't find how to do it Frown (or at least find a way that works).

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
Hi,

Try `myisamchk -r *.MYI`. What does that display?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] MySQLDump problem.. In reply to
Alex, your a genious! Smile It worked like a charm..all seems to be working fine now!

Thanks everyone for your input/help :)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
And for future reference, all this info is well-documented at http://www.mysql.com:

http://www.mysql.com/.../Crash_recovery.html

- wil
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
>>Alex, your a genious! <<

He just reads the docs ;)

Or:

myisamchk --help
Quote Reply
Re: [Paul] MySQLDump problem.. In reply to
Ah..thought it had worked, but it didn't :( Still complaining about the *.MYD files Frown Any more ideas?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
http://www.mysql.com/.../Crash_recovery.html

- wil
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
Wil..I've been over this page a few times...but I can't seem to get a command together to fix my *.MYD files...works ok with the *.MYI ones Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
Hm. If you're reached this far you're in hot water. And running a lot more of these REPAIR TABLES commands on your server might loose your data for good.

I think you need to start thinking to yourself *why* this is happening. Try:

http://www.bitbybit.dk/...doc397.html#Crashing

- wil
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
In Reply To:
Alex, your a genious! Smile
yeah, a definate genious. or maybe a definite genius. who knows in this topsy turvey world.
Quote Reply
Re: [Donald Rumsfeld] MySQLDump problem.. In reply to
And, once again MySQL is annoying me! When I try to add another field in Links SQL, I get;

Unable to add column 'CurrentBid'. Reason: Failed to execute query: 'ALTER TABLE links_Links ADD CurrentBid INT' Reason: Error writing file './links_sql_dump/#sql-1dcb_76.frm' (Errcode: 28)

Anyone? Unsure I've searched for (errcode: 28), and "Error writing file", but none of them turned up helpful pages Frown

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
Your disk is full, or at least the partition MySQL stores it's data on is full.

Error 28 - you ran out of free disk space.

What's the partition MySQL is storing it's data on? And what is the output of df ?

You could get around this by moving your MySQL files to somewhere else, a bigger partition on your system and just symlinking to the new locations, or you can reinstall MySQL on a different partition or you can delete a few tables or you can get a bigger disk ...

- wil

Last edited by:

Wil: Jul 9, 2002, 6:29 AM
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
By the way, error 28 is an operating system error and will be specific to your OS. I can't remember - you're running RedHat, yeah? On a RedHat system it could also mean that you have actually got too many files on the disk, so you might see some disk space free. Have you got a lot of mail stacked up or a lot of tmp files everywhere?

- wil
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
Hi...this is the output of it df and df -H

Code:
[root@www /root]# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda8 521748 521716 0 100% /
/dev/hda1 23302 3485 18614 16% /boot
/dev/hda10 33293164 2964236 28637688 10% /home
/dev/hda9 256667 36 243379 1% /tmp
/dev/hda5 2071384 1966168 0 100% /usr
/dev/hda6 1257048 106440 1086752 9% /var
[root@www /root]# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/hda8 534M 535M 0 100% /
/dev/hda1 24M 3.6M 19M 16% /boot
/dev/hda10 34G 3.1G 29G 10% /home
/dev/hda9 263M 37k 249M 1% /tmp
/dev/hda5 2.1G 2.1G 0 100% /usr
/dev/hda6 1.3G 109M 1.1G 9% /var

What would you suggest deleting on /usr/ ro / (I'm assuming that is where MySQL is, as they are the only ones with 100% used Unsure

In /tmp/, I have;

Quote:
-rw-rw-rw- 1 nobody nobody 548205 Jun 25 15:47 GTMM102503805327991859
-rw-rw-rw- 1 nobody nobody 125754 Jul 2 18:31 GTMM102565266621725809
-rw-rw-rw- 1 nobody nobody 125754 Jul 2 18:31 GTMM102565268921728951

Do you think I should get rid of them?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Wil: Jul 9, 2002, 6:44 AM
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
Um. Something is eating up all your disk space here? Is someone sending out spam mail from your server? Check your /var/spool/* directories. Check your mail directories. Check your mail queue.

Something is eating up a lot of disk space here, and it ain't in your /tmp directory.

- wil
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
In 'mail' I have;

-rw------- 1 dumps mail 301k Jul 9 14:05 dumps
-rw------- 1 template mail 165k Mar 21 16:00 imps
-rw------- 1 root root 84M Jul 9 14:35 root
-rw------- 1 template mail 0 Apr 3 07:31 templates.ws

I'm thinking that the 3rd one down could be deleteted...and am looking at the other directories now.

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MySQLDump problem.. In reply to
Is your web server actually functioning at the moment?!

By the way, that's a bit of a redundant partition on /boot.

Cheers

- wil
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
Maybe this snippet will help, too:

Code:
# script to find big files
echo -e "Please enter the Directory you would like to scan: \c"
read dir
find $dir -size +5000k -print > ~/bigfiles 2>&1
echo -e "Press Y if you would like to see a list of the files found: \c"
read ans
while [ -s ~/bigfiles ]
do
if [ $ans = y -o $ans = Y ]; then
echo "The files will be listed with less"
less ~/bigfiles
exit 0
else
echo "Exiting script...."
exit 0
fi
done
echo "Did not find any big files"
exit 0

- wil
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
This might help, too:

http://groups.google.com/...erver.com%26rnum%3D3

Scroll to the top post.

Nice looking URL, that. :-)

- wil

Last edited by:

Wil: Jul 9, 2002, 7:09 AM
Quote Reply
Re: [Wil] MySQLDump problem.. In reply to
Your script is giving me an error;

Quote:
[root@www public_html]# perl big_file.cgi
[Tue Jul 9 15:12:25 2002] big_file.cgi: syntax error at big_file.cgi line 7, near "echo -e "
[Tue Jul 9 15:12:25 2002] big_file.cgi: Bareword found where operator expected at big_file.cgi line 7, near "at big"
[Tue Jul 9 15:12:25 2002] big_file.cgi: (Do you need to predeclare at?)
Content-type: text/html

<H1>Software error:</H1>
<PRE>Unrecognized character \x81 at big_file.cgi line 7.
</PRE>
<P>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.

[Tue Jul 9 15:12:25 2002] big_file.cgi: Unrecognized character \x81 at big_file.cgi line 7.

Cheers...I'll look at that Google thing.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
> >