3

I have a fresh install of WordPress 6.5.3 on MySQL 5.7.44-1.el7 up and running via Docker, accessible via my web browser.

I also have old data from WordPress 2.0.2 on MySQL 4.1.14 saved into a directory that contains the following files:

4.0K db.opt
4.0K wp_categories.MYD
4.0K wp_categories.MYI
 12K wp_categories.frm
4.0K wp_comments.MYD
4.0K wp_comments.MYI
 12K wp_comments.frm
4.0K wp_linkcategories.MYD
4.0K wp_linkcategories.MYI
 12K wp_linkcategories.frm
4.0K wp_links.MYD
4.0K wp_links.MYI
 12K wp_links.frm
8.0K wp_options.MYD
8.0K wp_options.MYI
 12K wp_options.frm
4.0K wp_post2cat.MYD
8.0K wp_post2cat.MYI
 12K wp_post2cat.frm
4.0K wp_postmeta.MYD
8.0K wp_postmeta.MYI
 12K wp_postmeta.frm
 80K wp_posts.MYD
8.0K wp_posts.MYI
 12K wp_posts.frm
4.0K wp_usermeta.MYD
8.0K wp_usermeta.MYI
 12K wp_usermeta.frm
4.0K wp_users.MYD
4.0K wp_users.MYI
 12K wp_users.frm

I no longer have access to MySQL 4.1.14 to export the old data to SQL files, nor do I have access to the old WordPress. I have kept the credentials (username, password) for that data.

Is it possible at all to import that old data into my new (docker based) WordPress setup?

If so, what are my available options?

6
  • 1
    @Ramhound It wasn't a website but rather a local blog on a Linux server back then in year 2005... So yes, your observation that the original site was extremely small is correct. Can you elaborate on the database dump that I can import? Note: I no longer have access to that MySQL 4.1.14 and I don't know where I can download it from. Thank you
    – ususer
    Commented May 21 at 14:44
  • WordPress isn’t a website? Alright, was the WordPress instance, extremely small? If you did not dump the database in 2005 there is nothing you can do. What are the contents of the files you do have?
    – Ramhound
    Commented May 21 at 14:52
  • 2
    Is there a reason you're not using some flavour of MySQL 8 (or MariaDB) for a fresh install? 5.7 support ended last year...
    – jcaron
    Commented May 22 at 10:46
  • 1
    @Ramhound by website I mean exposed to the Internet. My WordPress instance was on my LAN only, more like a diary rather than publicly visible blog. :)
    – ususer
    Commented May 23 at 4:52
  • 1
    @jcaron Yes, the reason is that I want to minimize migration issues. The 5.7 fresh install is only running on my laptop, unexposed to the Internet.
    – ususer
    Commented May 23 at 4:54

2 Answers 2

4

Have you tried (on a copy of the files of course) something like https://github.com/andrebossi/mysql4 or https://github.com/Tommi2Day/mysql4 just to get a dump?

Actually, it might actually even work directly on your more recent mysql 5.7 install.

See https://stackoverflow.com/questions/879176/how-to-recover-mysql-database-from-myd-myi-frm-files on how to use the files you have (basically just copy the files in your install's data directory and check the table).

Note however that there is very little data in your files, less than 80K in the posts table.

1
  • 1
    I ended up using your Docker approach at github.com/andrebossi/mysql4 rather than the VM one. It works for me beautifully. Thank you.
    – ususer
    Commented May 23 at 17:31
8

There are still sites that have MySQL 4.1.x, such as Japan Advanced Institute of Science and Technology, which has v.4.1.21 downloads for various operating systems. That version is likely compatible with 4.1.14 file structure. You might also need Apache PHP v.5, available from Apache Lounge.

Download those installation files, which would need an older OS, such as 32-bit Windows 2000, install that OS in a virtual machine such as VirtualBox, and install MySQL 4.1.x and PHP on that VM. You then should be able to attach to the old files (and it appears you have the essential .frm, .MYD and .MYI files), and export the data.

Yes, it takes a few steps, but likely can be done in a day or so, if the data has value.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .