Log in

View Full Version : Databse problems


Valcrist
10-04-2008, 03:38 PM
Well, I have recently made a server, but we have scrapped it, I have gotten a database from a friend, and I am stumped on how to get .frm/.myi/.myd to convert to .sql, if any could help, would be appreciated greatly, thank you for your consideration of this problem

Derision
10-04-2008, 04:08 PM
On my Vista x64 box, MySQL databases are stored under:


C:\Program Files (x86)\MySQL\MySQL Server 5.0\data


E.g. I have a database called ykesha, and have various .frm/.MYD/.MYI files under


C:\Program Files (x86)\MySQL\MySQL Server 5.0\data\ykesha


I don't know if this will work (you should really transfer databases using mysqldump to a .sql file), but you could try and find where the MySQL databases are stored on your system, then create a directory and drop the .frm/.MYD/.MYI files in there.

E.g. using the paths on my system, I would try creating a directory:


C:\Program Files (x86)\MySQL\MySQL Server 5.0\data\eqdb


and dropping the files you have been given in there. You could then check if they are accessible by going into the MySQL command prompt and doing:


use eqdb;
show tables;


Just a guess, no idea if this will work.

GeorgeS
10-04-2008, 10:10 PM
If you create a new database then you can simply drop those in. It *should* work as long as the versions are the same. I've done this many times, but simply merging a different table format (inno.*) to one that's different won't work. If it's an old database table 4.x then you have to install a ver 4.x mysql on a test machine, and create a database, drop the files in then export to .sql without create table.

If the tables are different (as in fields) then you have to edit the .sql manually - assuming it won't load.

I've done this to nalgora and destiny databases with sucess for testing the contents with my tools.

GeorgeS