After an upgrade of my webserver from 12.04.5 LTS‬ to 16.04.2 LTS, my webserver no longer worked and I was forced to reinstall the server.

Unfortunately, I was only able to backup the raw database files from /var/lib/mysql without being able to make .sql backups.

I have reinstalled the server with Ubuntu 16.04.2 LTS and copied the backed up database files into the respective locations, but they do not work. The permissions were set to mysql:mysql - so that is not the problem. On the old system, I had MySQL version 5.5.53 and the new version is now 5.7.19. The system is running with Plesk Onyx 17.5.3 Update #17.

How can I correctly convert my raw MySQL files (*.frm, *.myd, *.myi) to work properly on the upgraded server?

I suspect I have to be able to first convert the old files to .sql format and then import them again on the new server?

But how?

I am a beginner with Linux, but do know enough to run command line commands. I often use Midnight Commander for configuration, etc. as well as Plesk.

  • 1
    Welcome to Ask Ubuntu... "That does not work" is rather meaningless. What is the exact error message you're getting as the files should be compatible within major MySQL versions... – Fabby Aug 12 '17 at 22:48

You might want to first check your databases with a compatible environment. E.g. a docker container

docker run --name mysql55 --detach --env=MYSQL_ROOT_PASSWORD=root mysql/mysql-server:5.5.53

will get you such an environment https://severalnines.com/blog/mysql-docker-containers-understanding-basics shows you how to go from there.

Now you can check with other versions whether the import works. Personally I would not go for 5.7.19 directly since that version has "features" that make handling it more difficult then e.g. 5.7.14. E.g. in my environment a 5.7.14 docker image works on Mac an Linux but a 5.7.19 does not. See http://wiki.bitplan.com/index.php/Docker_on_Mac

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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