3

The old versions of our product allowed to capture the current state of the system in a single archive file, which also contains the MySQL database files - lots of <XXX.frm, XXX.myd, XXX.myi> triples .

Now we have the next generation of the product, which does not do anything stupid like capturing the database files, but it must know to read the archives produced by the old versions.

Our product is a commercial closed source product, but it is not very expensive. We had to stop using MySQL, because of the second reason (Oracle has changed the MySQL licensing) and we cannot use MariaDB, because of the first one (their licensing freaked the s*t out of the company lawer).

So, my question is there another way to read these MySQL database files? A commercial light weight solution is fine - after all, we are talking about read-only exploration of the database files. Free/Open Source alternatives are welcome too, as long as they do not mean that the code using them must be Open Source too.

Thanks.

EDIT

Besides the issue whether I can or cannot continue using the old version of MySql to read the old MySql database files, the question remains how can I read them? I mean, MySql is no longer our database, so even if I can bundle with the old MySql implementation, do I have to install the full blown database engine to just read the files? I'd rather avoid that.

mark
  • 59,016
  • 79
  • 296
  • 580
  • 1
    if all you want to do is read the data, it's not that hard. Just will take some documentation reading or some reverse engineering. Oh, and ignore the Myi file. You just want the data (which is in the myd file) and format (the frm file)... – ircmaxell Dec 25 '11 at 13:52
  • This is always an option, but I'd like to keep it the last one. – mark Dec 25 '11 at 13:54
  • You may be able to use old versions of MySQL under the older licensing scheme, if the project already used them. See [Does a License Change for OSS cover all versions, including previous releases?](http://programmers.stackexchange.com/questions/82131/) and consult a lawyer. – outis Dec 25 '11 at 14:03
  • Thanks for the info - I will pass it to the relevant folk. It is still not the answer, but is definitely worth upvoting - could you repost it as an answer? – mark Dec 25 '11 at 14:09
  • 2
    We went through something similar recently; we found we were able to export all of our data and then use http://en.wikipedia.org/wiki/SQLite with our product. It all depends on the complexity! It's used by many commercial closed source products. – dash Dec 25 '11 at 14:41
  • This is not my case. The archive files will have to be read after the product is deployed, because there are many of them out there. We cannot convert all of them to sqlite in R&D or Support. – mark Dec 25 '11 at 16:27
  • Percona is another drop-in replacement like MariaDB, I don't know if it will have the same problemas as the other two... – golimar Dec 25 '11 at 19:13

2 Answers2

1

If you want to go thru tables structure it would be enough to read the following links. MySQL internals (all), File Format, MyISAM

If it is not enough and you database size less then 10G you can use Ms SQL Server Express (which is free with DB less than 10G. Page to compare different versions of Ms SQL Server is here). Search for the way to convert MySQL files to Ms SQL Server. Here is the first link a got from Bing: link1 (I suppose not all of them need MySQL server)

If it is not suitable. You can try another MySQL forks like: XtraDB, OurDelta, Drizzle, PBX and so on.

Hope you will find something useful.

ravnur
  • 2,772
  • 19
  • 28
  • Unfortunately, I cannot find a way to read the files without having the database engine installed. – mark Dec 29 '11 at 07:39
1

We have found a solution. Unfortunately, it involves MySQL, so there are potential licensing issues. Here it is - http://dev.mysql.com/doc/refman/5.0/en/libmysqld.html

All it takes is download the MySql source code and help yourself with:

  • libmysqld.dll
  • libmysqld.lib
  • header files from the include folder

Then it is possible to read the files using the embedded MySQL database engine inside libmysqld.dll.

mark
  • 59,016
  • 79
  • 296
  • 580