dbTalk Databases Forums  

Need help in recreating .MYD files

mailing.database.myodbc mailing.database.myodbc


Discuss Need help in recreating .MYD files in the mailing.database.myodbc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Need help in recreating .MYD files - 05-08-2006 , 09:04 AM






------=_Part_13127_23257334.1147097043435
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Dear Comunity,

I need your help. I accidently deleted some '.MYD' files. I want to restore
them, without stopping the running server. how i can do this. i am using
Linux OS, i tried to create file using ---> vi tablename.MYD(a blank file)
but it is not accepted by MySql.

regards,
bala

------=_Part_13127_23257334.1147097043435--

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-08-2006 , 09:59 AM






Hi,

If you have deleted .MYD files then truncate the table and restore it
from the backup if yu have.
MYD means your precious data which contains.

balaraju mandala wrote:

Quote:
Dear Comunity,

I need your help. I accidently deleted some '.MYD' files. I want to
restore
them, without stopping the running server. how i can do this. i am using
Linux OS, i tried to create file using ---> vi tablename.MYD(a blank
file)
but it is not accepted by MySql.

regards,
bala



--
Thanks & Regards,
Dilipkumar
DBA Support

********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin (AT) sifycorp (DOT) com

Watch India vs. England LIVE, Hot videos and more only on Sify Max! Click Here. www.sifymax.com

Get to see what's happening in your favourite City on Bangalore Live! www.bangalorelive.in


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-09-2006 , 12:33 AM



------=_Part_26753_30180596.1147152785093
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Dilip,

it means i loosed the data, correct Dilip. is there any other way to gain
that data, any binary logs etc?

regards,
bala

------=_Part_26753_30180596.1147152785093--

Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-09-2006 , 01:04 AM



Hi,

please tell me the server uptime and also the master logs as
show master logs;

in mysql prompt.

Yes u can restore data from the binlog if you have the binlogs.

balaraju mandala wrote:

Quote:
Hi Dilip,

it means i loosed the data, correct Dilip. is there any other way to gain
that data, any binary logs etc?

regards,
bala



--
Thanks & Regards,
Dilipkumar
DBA Support

********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin (AT) sifycorp (DOT) com

Watch India vs. England LIVE, Hot videos and more only on Sify Max! Click Here. www.sifymax.com

Get to see what's happening in your favourite City on Bangalore Live! www.bangalorelive.in


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-09-2006 , 01:26 AM



------=_Part_409_6514266.1147155993172
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Dilip,

I got two binary logs in Server. I don't know how to find server uptime?

mysql> show master logs;
+----------------------+
Quote:
Log_name |
+----------------------+
localhost-bin.000008 |
localhost-bin.000009 |
+----------------------+
2 rows in set (0.00 sec)

if i ask for structure it is giving error message

mysql> desc userdetails;
ERROR 1016 (HY000): Can't open file: 'userdetails.MYI' (errno: 145)

if i create .MYD file using vi editor, MySql giving following message

mysql> desc userdetails;
ERROR 1105 (HY000): File './everest/userdetails.MYD' not found (Errcode: 13=
)

but the file is exist.

tell me how i can get the data.

regards,
bala

------=_Part_409_6514266.1147155993172--


Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-09-2006 , 10:35 AM



On 5/9/06, balaraju mandala <balaraju.mandala (AT) gmail (DOT) com> wrote:
Quote:
Hi Dilip,

I got two binary logs in Server. I don't know how to find server uptime?

mysql> show master logs;
+----------------------+
| Log_name |
+----------------------+
| localhost-bin.000008 |
| localhost-bin.000009 |
+----------------------+
2 rows in set (0.00 sec)

if i ask for structure it is giving error message

mysql> desc userdetails;
ERROR 1016 (HY000): Can't open file: 'userdetails.MYI' (errno: 145)

if i create .MYD file using vi editor, MySql giving following message
You don't need "some file with that name". You need a special MySQL
created data file with lots of headers and content.

Quote:
mysql> desc userdetails;
ERROR 1105 (HY000): File './everest/userdetails.MYD' not found (Errcode: =
13)

but the file is exist.
Exists, but its invalid in all aspects (size 0, no headers, no content).

Quote:
tell me how i can get the data.
You must understand that the .MYD file IS the data. So, to recover it,
you'll have to just use another source (backup, binlog). A backup is
usually an sql file, you'll have to recreate your table and populate
it with the data on the backup, or, if your backup has the structures,
you'll just have to use it to recreate the whole database.

The binlog files logs all queries to the server, this way, it can
recreate the changes on the database, but that requires a snapshot of
the state where the binlog started.

Another option would be to try and recover the lost files from the
filesystem, but all the commands you issued and the simple fact that
your system is running may have already overwritten the free space
that your files used to take. And besides that is an expensive and
tecnical solution.

In simple terms, if you have no backups, your binlogs are outdated or
rotated to an extend (old changes lost) and you can't recover the
files from the filesystem. You're pretty much f**** up (don't get me
wrong, It happened to me once, and now I have daily backups, a
replicated server and binlogs saved daily too).

--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3...ie.nctu.edu.tw



Reply With Quote
  #7  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-09-2006 , 10:54 AM



------=_Part_6605_17573430.1147189552469
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Thank you Daniel for reply.

Just in curiocity i want ask u, how u r taking daily backups, just using
'mysqldump' or using any Tools.

regards,
bala

------=_Part_6605_17573430.1147189552469--

Reply With Quote
  #8  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-09-2006 , 11:18 AM



On 5/9/06, balaraju mandala <balaraju.mandala (AT) gmail (DOT) com> wrote:
Quote:
Thank you Daniel for reply.

Just in curiocity i want ask u, how u r taking daily backups, just using
'mysqldump' or using any Tools.

I'm using mysqldump plus bzip2 to compress data for about 2 years now.
Tried many tools, mysqldump scripted in bash (linux) or even in .bat
(windows) was always better than any other tools.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3...ie.nctu.edu.tw



Reply With Quote
  #9  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-10-2006 , 10:24 AM



------=_Part_3440_12327693.1147268713564
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

*Ok Daniel,*
**
* Thank you.*
**
*regards,*
*bala*
**

------=_Part_3440_12327693.1147268713564--

Reply With Quote
  #10  
Old   
AT
 
Posts: n/a

Default Re: Need help in recreating .MYD files - 05-11-2006 , 07:24 AM



hi,
Just to add up i have read some where ( i assume in the mailing list
only) that OS recognizes the file based on few codes added at the
starting / ending of a file. So there are ways to create a MYD file
through vi editor as well (this is not from the angle of restoring the
data in that table). As Daniel said if there is no binlogs/ update /
query logs there is no way of restoring data to the current date.

--
Regards,
N.PradeepChandru,
MySQL DBA, Cricinfo Pvt Ltd.


Daniel da Veiga wrote:
Quote:
On 5/9/06, balaraju mandala <balaraju.mandala (AT) gmail (DOT) com> wrote:
Thank you Daniel for reply.

Just in curiocity i want ask u, how u r taking daily backups, just using
'mysqldump' or using any Tools.


I'm using mysqldump plus bzip2 to compress data for about 2 years now.
Tried many tools, mysqldump scripted in bash (linux) or even in .bat
(windows) was always better than any other tools.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.