This is a discussion on Convert .myd file to SQL Query? within the MySQL Database forums, part of the Database Forums category; A table in my MySQL database has become corrupted and I need to restore it from a backup. Unfortunately, the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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 --help; |
|
|||
|
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 --help; 'an error' is quite harder to troubleshoot then 'I get _this_ error:<errormsg>' -- Rik Wasmus |
|
|||
|
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 --help; > > '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 --help' at line 1 though. -- When you have a thermic lance, everything looks like hours of fun. -- Christian Wagner in a.s.r |
|
|||
|
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 --help' 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 |