Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a bunch of *.frm, *.myd and *.myi files, which are a MySQL database store.

I need to extract the data kept in these files, but I do not have a MySQL database engine at my disposal.

Is there a tool or library, which can do this?

Please, do not suggest installing the database engine (be it MySQL or MariaDB or other MySQL forks). My question is specific about extracting the data without the full blown database engine. In essence, I am looking for an embedded database engine, which can be distributed with my code and which demands no installation.

I am not looking into doing complex queries, I just need to fetch all the data from one or two particular tables.

Thanks.

EDIT

I am aware of http://dev.mysql.com/doc/refman/5.0/en/libmysqld.html, but I do not understand how to download it. What is the licensing for commercial usage? Should I download and install the full blown database to get hold on the libmysqld files (headers, lib + dll)? Even though I do not need the full database? In short, it creates more questions than answers. I am still looking for an advice.

share|improve this question
    
I guess you already know this: mysql.com/oem –  ypercube Dec 29 '11 at 8:09
    
Actually, dev.mysql.com/doc/refman/5.0/en/libmysqld.html is much closer to what I need. But I would like to know what others recommend. –  mark Dec 29 '11 at 8:12
add comment

2 Answers

If you are brave and a little fool-hearty, try this crazy idea:

Since myisamchk can read, write, and analyze MyISAM tables independent of mysqld, get a hold of the source code for myisamchk, take a look around and see if you can borrow any C/C++ code, algorithms, structures, classes, or just any ideas from it.

share|improve this answer
1  
Thanks for the hint, but this is too extreme for me. +1 for the audacity, though. –  mark Dec 29 '11 at 20:40
add comment

Maybe you should be looking at SQLite instead? You're kind of vaugue about where that data is coming from... if it's something you generated yourself, or if it's a on a server you've compromised and the DB is just too big to send over the wire and you only want certain columns from it. ;)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.