gevans Posted April 29, 2009 Share Posted April 29, 2009 Hey guys, My computer died a few days ago, and I've built a new system. I've also put a new hard drive and re-installed an operation system (XP). So that I can et back to my work quickly I've put xampp in place until I have a bit more time. The hard drive from my old system (also xp) is now running as a slave so I can get everything off it. Is there anyway I am able to access MySQL on my old hard drive, export databases and tables and import it into my new installation? Hope this makes sense. If you need any more info please let me know. Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/ Share on other sites More sharing options...
fenway Posted April 29, 2009 Share Posted April 29, 2009 We need lots of information -- what server, what tables, what data, etc. Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-821812 Share on other sites More sharing options...
gevans Posted April 29, 2009 Author Share Posted April 29, 2009 New installation --------------- MySQL * Server version: 5.1.33-community * MySQL charset: UTF-8 Unicode (utf8) Server * Apache/2.2.11 PHP/5.2.9 Old hard drive ------------- MySQL * Server version: 5.0 Most tables are MyISAM There are ac ouple of InnoDB Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-821817 Share on other sites More sharing options...
fenway Posted April 29, 2009 Share Posted April 29, 2009 MyISAM sholdbe be easy ... you can just copy frm/myi/myd files from the database directory. Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-821829 Share on other sites More sharing options...
gevans Posted April 29, 2009 Author Share Posted April 29, 2009 Ah yes, They all seem to be working fine. I tried copying everything across (excpet for the table `mysql` and user profile stuff), some databases show up with no table, though it has the correct number of tables in brackets that should be in the database!? Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-821836 Share on other sites More sharing options...
gevans Posted April 29, 2009 Author Share Posted April 29, 2009 A lot of the folders in data/ also on have a .opt file and .frm for each table. Tehre are no .myi or .myd files. These show all the tables but none of the data! Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-821887 Share on other sites More sharing options...
fenway Posted April 29, 2009 Share Posted April 29, 2009 Well, that's because you have only the table structure -- the frm -- you need to find the myd/myi (data and index) files. Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-822036 Share on other sites More sharing options...
gevans Posted April 29, 2009 Author Share Posted April 29, 2009 Sorry to sound dumb, but any idea where I might find them if their not in the data/ folder?? Also... one of the databases is doing this.... #mysql50#vhd-main Originally called 'vhd-main' After copying across it adds '#mysql50#' Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-822045 Share on other sites More sharing options...
fenway Posted April 29, 2009 Share Posted April 29, 2009 What's "it"? How are they being copied?' And if you have the old my.cnf file, you'll see where the datadir is. Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-822089 Share on other sites More sharing options...
gevans Posted April 29, 2009 Author Share Posted April 29, 2009 Also... one of the databases is doing this.... #mysql50#vhd-main Originally called 'vhd-main' After copying across it adds '#mysql50#' I've sorted that problem. Got an uptodate copy from the web And if you have the old my.cnf file, you'll see where the datadir is. I already have access to the datadir. (I also double checked in the my.ini file) Some of the databases (that def had data) are adding the tables, but no data because as you said there's no myd/myi files only frm files. I can't figure out why they wouldn't have myd/myi files if they had data in the tables. Quote Link to comment https://forums.phpfreaks.com/topic/156120-accessing-old-mysql-tables/#findComment-822236 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.