473,666 Members | 2,111 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.MY I' (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 4487
Rock2005 wrote:
#1017 - Can't find file: 'master_name.MY I' (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**********@y ahoo.com> wrote in message
news:mA******** ******@read3.in et.fi...
Rock2005 wrote:
#1017 - Can't find file: 'master_name.MY I' (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.add ress 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.add ress 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
8903
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? I am running UDB 8.2 on Linux and AIX. Thanks.
2
3597
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 same machine. PRODUCTION is currently accessed by 50 clients running many applications and by some REXX scripts running on the same server machine on a timely basis. I do not want to modify in any way clients configuration, applications,
6
1460
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 SQL Server 2000 on the server of the client's local area network, which is a Windows 2000 machine. I am concerned about doing this right. On my own machine I did the install incorrectly at first and had to re-install. I had a very hard time...
2
6971
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 entries - repointing everything to drive E instead of D. SQL Server however will not start it says it cannot find the databases. Where is this information stored. How can I go about changing it? ~Todd
3
4558
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 application that will have a number of "subjects". The subjects have a number of commonalities, but are not identical. I am hoping that I will discover that the subjects fall into a few "types" and a common database structure can be used for each type. ...
2
1229
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 for moving the logs for the system databases. Is there any way I can move the system database logs? I'm guessing it might be possible through a restore. Any thoughts ?
7
12571
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 the advanced options) it doesn't change. Here's the weird part... it shows that it is configured to have the page file on the other hard drive, but the actual file still resides on C and I can't delete it (all of this is after a reboot). I even...
3
1892
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 image and placing the image onto the new drive. I think this is more of a Windows 2003 problem, but this server is for nothing but the SQL Server databases. Does anyone have a clear method of moving this server to the larger drives? TIA.
15
2437
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 do together overlapping common pieces but say connected each working out as connected, but together as connected it's connected with the others connected. a whole machine where connected together is a condition of the machine together as...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8552
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2773
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 we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.