473,511 Members | 16,769 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Moving databases from one hard drive to another ?

Hi All,
I have a hard drive that fails to boot with some mysql 4.1 data I would like
to keep.
Have slaved that drive to another PC (with mysql 4.1.12 loaded) and have
saved other data and am able to access its MYSQL folder ...

I tried to copy the data folder into corresponding directory on new drive
but when I try ot look at any of the databases I get errors like:

#1017 - Can't find file: 'master_name.MYI' (errno: 2)

... I look for corresponding .MYI files but cant find any on the old drive.

Have I lost my database files or is there another way of porting the
database to the new drive.

I'd greatlt apprecaite if anyone can point me in correct direction.

Regards

Paul
Jul 23 '05 #1
3 4479
Rock2005 wrote:
#1017 - Can't find file: 'master_name.MYI' (errno: 2)

... I look for corresponding .MYI files but cant find any on the old drive.

Have I lost my database files or is there another way of porting the
database to the new drive.


Try running following queries:
CHECK TABLE tablename;
http://dev.mysql.com/doc/mysql/en/check-table.html

REPAIR TABLE tablename;
http://dev.mysql.com/doc/mysql/en/repair-table.html

Also see this from the link above:
"As of MySQL 4.0.2, there is a USE_FRM mode for REPAIR TABLE. Use it if
the .MYI index file is missing or if its header is corrupted. In this
mode, MySQL re-creates the .MYI file using information from the .frm file."
And next time, be sure to create backups from your important data.
Jul 23 '05 #2

"Aggro" <sp**********@yahoo.com> wrote in message
news:mA**************@read3.inet.fi...
Rock2005 wrote:
#1017 - Can't find file: 'master_name.MYI' (errno: 2)

... I look for corresponding .MYI files but cant find any on the old
drive.

Have I lost my database files or is there another way of porting the
database to the new drive.


Try running following queries:
CHECK TABLE tablename;
http://dev.mysql.com/doc/mysql/en/check-table.html

REPAIR TABLE tablename;
http://dev.mysql.com/doc/mysql/en/repair-table.html

Also see this from the link above:
"As of MySQL 4.0.2, there is a USE_FRM mode for REPAIR TABLE. Use it if
the .MYI index file is missing or if its header is corrupted. In this
mode, MySQL re-creates the .MYI file using information from the .frm
file."
And next time, be sure to create backups from your important data.


Thanks for the pointer Aggro ... I tried Repair table with USE_FRM and still
get same reapair error.

eg. REPAIR TABLE address USE_FRM
addressbook.address repair error Can't find file: 'address.MYI' (errno: 2)

Unfortunately the backups were all on another partition which are unreadable
.... I will CD backup next time :(

I wonder is ther a way to run the backup utility on on the old drive to
retreive the databases ....
Jul 23 '05 #3
Rock2005 wrote:
Thanks for the pointer Aggro ... I tried Repair table with USE_FRM and still
get same reapair error.
Did you run check first? I'm not sure if it is needed, but better run it
first to play safe.
eg. REPAIR TABLE address USE_FRM
addressbook.address repair error Can't find file: 'address.MYI' (errno: 2)
Just guessing now, but you could try to create the file (and make sure
if got same user permissions as the other files in the database folder).
Then it should at least give a different error.

If everything else fails, you should still be able to retrieve the data
manually from the MYD file, which can be slow, but at least possible.
But I'm pretty certain that you should be able to recover the database
if your MYD-file and FRM-file.
Unfortunately the backups were all on another partition which are unreadable
... I will CD backup next time :(


It is surprising how many people think that backups on a same hard drive
are a good idea. When I had really important data, I created backups on
two different homecomputers + 2 computer in same city, but different
parts of it + 1 backup on a computer that was on a different country (or
could been on different continent also).

I've been trying to tell to many people to take care of the backups.
Only way they seem to bulieve is by learning it from experience. It is
sad. But let's hope you can retrieve the data.
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
8870
by: Hemant Shah | last post by:
Folks, I need to move HOME directory of an instance to another directory. What is the best way of doing it? Is changing password file enough? or dies DB2 store this info in it's own config? ...
2
3589
by: Massimiliano Campagnoli | last post by:
Good morning, Database PRODUCTION was created on a system mamanged tablespace on drive c:\ Now drive c:\ is running out of space and I need to move PRODUCTION to the larger drive d:\ on the...
6
1451
by: Woody Splawn | last post by:
I have been using SQL Server 2000 on my stand-alone machine as a back-end to a VS.net application. It is time to switch environments and take the application to the customer. I need to install...
2
6962
by: Todd Beauchemin | last post by:
We installed MS SQL Server to our drive D drive E was the CDROM Drive. We wanted to move the CDROM drive to drive D and the hard drive to drive E. We change that around and corrected the registry...
3
4543
by: LurfysMa | last post by:
I would like to hear opinions on the tradeoffs of putting the tables, forms, and queries for several related datasets in separate databases vs one combined database. I am working on an...
2
1216
by: DataPro | last post by:
Running SQL Server 2000. I have been asked to move the transaction logs to another drive. I was able to do that for the user databases using detach/attach. However I don't see that as an option...
7
12560
by: narpet | last post by:
Hello all... I'm having a problem moving my swap file to a drive other than my primary drive. Right now I have a 3+ gig pagefile.sys that resides on my C drive. When I try to reconfigure (through...
3
1887
by: scoots987 | last post by:
I have a Windows 2003 server with SQL Server 2005 installed. The server is on small drive and we would like to upgrade to much larger harddrives. I've been hearing of problems using Ghost to get an...
15
2417
by: mcjason | last post by:
I saw something interesting about a grid pair puzzle problem that it looks like a machine when you find each that work out the way it does and say with all the others that work out the way they...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5066
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.