|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
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 --; |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Oh yeah- I've got MySQL 5.0 installed on a fully patched Windows XP
Pro machine. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
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) |
|
|
|
#13 |
|
Messages: n/a
Hébergeur: |
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. |
|
![]() |
| Outils de la discussion | |
|
|