PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > Convert .myd file to SQL Query?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Convert .myd file to SQL Query?

Réponse
 
LinkBack Outils de la discussion
Vieux 03/01/2008, 17h19   #1
karljcox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Convert .myd file to SQL Query?

A table in my MySQL database has become corrupted and I need to
restore it from a backup. Unfortunately, the only backups my web host
provides are the actual database files (i.e. myd, frm and myi files).
I do not have root access to the web server, so I am not able to
restore my corrupted table using these files.

Is there a way to convert the myd file to a sql query? I have already
recreated the corrupted table's structure, but now need to be able to
restore the table's data and the only backup I have are these files.
  Réponse avec citation
Vieux 03/01/2008, 17h37   #2
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Thu, 03 Jan 2008 18:19:46 +0100, <karljcox@gmail.com> wrote:
> A table in my MySQL database has become corrupted and I need to
> restore it from a backup. Unfortunately, the only backups my web host
> provides are the actual database files (i.e. myd, frm and myi files).


And you promptly pointed out this was ridiculous offcourse.

> I do not have root access to the web server, so I am not able to
> restore my corrupted table using these files.


If they have a backup of those files, shouldn't they be able to put some
specific requested files back?

> Is there a way to convert the myd file to a sql query? I have already
> recreated the corrupted table's structure, but now need to be able to
> restore the table's data and the only backup I have are these files.


Afaik, no. Install the exact same MySQL version on a comparable computer,
copy the files to it, and pray it will understand them. Then you can run a
simple mysqldump.
--
Rik Wasmus
  Réponse avec citation
Vieux 03/01/2008, 17h44   #3
karljcox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

Rik - Thanks for the reply. Yeah, I did expressed to them how
rediculous the situation was. The only solution they offered was to
restore my _entire_ database back to one of my backups which is,
needless to say, very inconvenient as all of my other tables (the non-
corrupted ones) would then lose a weeks worth of data too.
  Réponse avec citation
Vieux 03/01/2008, 18h15   #4
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Thu, 3 Jan 2008 09:44:43 -0800 (PST), karljcox@gmail.com wrote:
> Rik - Thanks for the reply. Yeah, I did expressed to them how
> rediculous the situation was. The only solution they offered was to
> restore my _entire_ database back to one of my backups which is,
> needless to say, very inconvenient as all of my other tables (the non-
> corrupted ones) would then lose a weeks worth of data too.


If they've got the entire database as a mysqldump output, it's not THAT
hard to lop off parts to restore just the tables you need. The output is
just giant, honkin' SQL commands, after all, and any good* text editor
should be able to manipulate it properly as plain text.

* For careful values of "good". WordPad doesn't qualify, for example.

--
I hate mornings. I know they hate me back, too.
-- Joel Gluth
  Réponse avec citation
Vieux 03/01/2008, 19h37   #5
karljcox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

Ok, I've got MySQL installed, and the .myd, .myi and .frm files copied
over but I am unable to get mysqldump to start. I'm running MySQL 5.0
- is mysqldump built in to MySQL or is this something that I will have
to download and install separately. I've done a bunch of searches but
can not prove either theory at this time.

This returns an error:

>mysqldump --;


  Réponse avec citation
Vieux 03/01/2008, 19h41   #6
karljcox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

Oh yeah- I've got MySQL 5.0 installed on a fully patched Windows XP
Pro machine.
  Réponse avec citation
Vieux 03/01/2008, 19h43   #7
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Thu, 03 Jan 2008 20:37:43 +0100, <karljcox@gmail.com> wrote:

> Ok, I've got MySQL installed, and the .myd, .myi and .frm files copied
> over but I am unable to get mysqldump to start. I'm running MySQL 5.0
> - is mysqldump built in to MySQL or is this something that I will have
> to download and install separately. I've done a bunch of searches but
> can not prove either theory at this time.
>
> This returns an error:
>
>> mysqldump --;


'an error' is quite harder to troubleshoot then 'I get _this_
error:<errormsg>'
--
Rik Wasmus
  Réponse avec citation
Vieux 03/01/2008, 20h20   #8
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Thu, 03 Jan 2008 20:43:30 +0100, Rik Wasmus wrote:
> On Thu, 03 Jan 2008 20:37:43 +0100, <karljcox@gmail.com> wrote:
>
>> Ok, I've got MySQL installed, and the .myd, .myi and .frm files copied
>> over but I am unable to get mysqldump to start. I'm running MySQL 5.0
>> - is mysqldump built in to MySQL or is this something that I will have
>> to download and install separately. I've done a bunch of searches but
>> can not prove either theory at this time.
>>
>> This returns an error:
>>
>>> mysqldump --;

>
> 'an error' is quite harder to troubleshoot then 'I get _this_
> error:<errormsg>'


There's strong odds on it being

ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'mysqldump --' at line 1

though.

--
When you have a thermic lance, everything looks like hours of fun.
-- Christian Wagner in a.s.r
  Réponse avec citation
Vieux 03/01/2008, 21h27   #9
karljcox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

Sorry guys- yep Peter has it:

ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'mysqldump --' at line 1

  Réponse avec citation
Vieux 03/01/2008, 21h37   #10
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Thu, 03 Jan 2008 22:27:40 +0100, <karljcox@gmail.com> wrote:

> Sorry guys- yep Peter has it:
>
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near 'mysqldump --' at line 1


And that would be because mysqldump is run from the shell, not the mysql
prompt (i.e. it's not a query of some sorts, it's a program).
--
Rik Wasmus
  Réponse avec citation
Vieux 03/01/2008, 23h41   #11
karljcox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Jan 3, 3:37pm, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
> On Thu, 03 Jan 2008 22:27:40 +0100, <karlj...@gmail.com> wrote:
> > Sorry guys- yep Peter has it:

>
> > ERROR 1064 (42000): You have an error in your SQL syntax; check the
> > manual that corresponds to your MySQL server version for the right
> > syntax to use near 'mysqldump --' at line 1

>
> And that would be because mysqldump is run from the shell, not the mysql
> prompt (i.e. it's not a query of some sorts, it's a program).
> --
> Rik Wasmus


Thanks for the information. Any idea where the mysqldump program can
be downloaded (or otherwise purchased)? My searches arent turning up
much.
  Réponse avec citation
Vieux 03/01/2008, 23h59   #12
Kees Nuyt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Thu, 3 Jan 2008 15:41:19 -0800 (PST),
karljcox@gmail.com wrote:

>On Jan 3, 3:37pm, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
>> On Thu, 03 Jan 2008 22:27:40 +0100, <karlj...@gmail.com> wrote:
>> > Sorry guys- yep Peter has it:

>>
>> > ERROR 1064 (42000): You have an error in your SQL syntax; check the
>> > manual that corresponds to your MySQL server version for the right
>> > syntax to use near 'mysqldump --' at line 1

>>
>> And that would be because mysqldump is run from the shell, not the mysql
>> prompt (i.e. it's not a query of some sorts, it's a program).
>> --
>> Rik Wasmus

>
>Thanks for the information. Any idea where the mysqldump program can
>be downloaded (or otherwise purchased)? My searches arent turning up
>much.


It is in the same directory as your mysql.exe
to find it from a CMD window, do :

dir /b /s C:\mysqldump.exe

Read:
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

Everywhere where it shows the
shell>
prompt, it assumes you are in a CMD window.
--
( Kees
)
c[_] -"If we are going to teach creation science as an alternative to
evolution, then we should also teach the stork theory as an
alternative to biological reproduction." (Judith Hayes)
-"You mean my mum wasn't telling me the truth?" (Jeff Gaines) (#147)
  Réponse avec citation
Vieux 04/01/2008, 17h43   #13
karljcox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert .myd file to SQL Query?

On Jan 3, 5:59pm, Kees Nuyt <k.n...@nospam.demon.nl> wrote:
> On Thu, 3 Jan 2008 15:41:19 -0800 (PST),
>
>
>
>
>
> karlj...@gmail.com wrote:
> >On Jan 3, 3:37pm, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
> >> On Thu, 03 Jan 2008 22:27:40 +0100, <karlj...@gmail.com> wrote:
> >> > Sorry guys- yep Peter has it:

>
> >> > ERROR 1064 (42000): You have an error in your SQL syntax; check the
> >> > manual that corresponds to your MySQL server version for the right
> >> > syntax to use near 'mysqldump --' at line 1

>
> >> And that would be because mysqldump is run from the shell, not the mysql
> >> prompt (i.e. it's not a query of some sorts, it's a program).
> >> --
> >> Rik Wasmus

>
> >Thanks for the information. Any idea where the mysqldump program can
> >be downloaded (or otherwise purchased)? My searches arent turning up
> >much.

>
> It is in the same directory as your mysql.exe
> to find it from a CMD window, do :
>
> dir /b /s C:\mysqldump.exe
>
> Read:http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
>
> Everywhere where it shows the
> shell>
> prompt, it assumes you are in a CMD window.
> --
> ( Kees
> )
> c[_] -"If we are going to teach creation science as an alternative to
> evolution, then we should also teach the stork theory as an
> alternative to biological reproduction." (Judith Hayes)
> -"You mean my mum wasn't telling me the truth?" (Jeff Gaines) (#147)- Hide quoted text -
>
> - Show quoted text -


Found it- It was in the bin folder. Thanks for the guys.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h43.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,23943 seconds with 21 queries