I
I
Ivan Melnikov2018-05-22 14:20:32
MySQL
Ivan Melnikov, 2018-05-22 14:20:32

How to make a database copy (structure and data) from a MySQL 5.6 server to a MySQL 8.0 server?

I read that if you dump the database (structure and data), then you need to import it to the MySQL server of the same version. How to import a database dump to a newer MySQL server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-05-22
@immelnikoff

You read something strange.
With some tricks around --compatible and other tricks, the data dump after mysqldump can even be imported into other databases. And for compatibility within mysql releases, a crowd of conditional comments with version checking is written to the dump.
Moreover, it is better to dump the version of mysqldump where you are going to import it.
But if you physically transfer the datadir of the database, and not the dump, then yes, within the same major version and a separate update instruction: https://dev.mysql.com/doc/refman/8.0/en/upgrading.html (from 5.6 on 8.0 it’s impossible at all, you need to upgrade 5.6-> 5.7, then 5.7-> 8.0)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question