Score:0

Ubuntu 16.04 - Recover data from MySQL by moving data folder into Win64 server

sa flag

my Ubuntu 16.04 machine refuses to boot anymore and I'm trying to recover the MySQL data folder. The MySQL version seems to be 8.0.18 (it was a Bitnami LAMP 7.3.15-0). My first attempt was to move the data folder to an Ubuntu 18.04 running MySQL 5.7 but the instance refuses to start, saying that metadata in the data dictionary (flags) don't match. I don't know if similar versions of MySQL are data-compatible across different platforms, now I'd like to try on a Win64 laptop, so:

  1. Can a Win64 MySQL install access the data copied from an Ubuntu server?
  2. Assuming the source system was 8.0.18 (Ubuntu), what version of MySQL should I install on the Windows laptop to read the data?
Hugo avatar
mx flag
This is probably more about MySQL than Ubuntu so you might have better luck asking on Stack Overflow or Server Fault
cn flag
NO. You need to dump the database to be able to use the data on Windows. You can move the data to another Ubuntu though.
waltinator avatar
it flag
Ubuntu 16.04 has passed its End-of-life date, and is no longer supported on AskUbuntu.
in flag
An Ubuntu VM running MySQL 8.0.18 or newer would be easiest, as it allows you to have a completely disposable environment to work with to extract the data. Create a DB with the same name, stop MySQL, copy the raw files *just for the database you need* to the MySQL data directory, set the permissions, start MySQL. From there, the DB engine will rebuild missing metadata and you should have access to the database again ... assuming there's nothing "special" that was done to the previous MySQL installation.
ManuelJE avatar
sa flag
@waltinator you're right but in fact the machine crashed just at the end of the `do-release-upgrade` process, in fact after the subsequent reboot (when already upgraded to 18.04) the **ssh daemon** didn't start anymore. And port 1022 was unusable as well. A bug in the upgrade script I suppose, I think the question refers to 18.04.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.