mysql
mysql

Migrate MySQL to MySQL

Certified — live-tested path

Same-engine MySQL migrations are how you move between hosts, clouds, or versions — and they still fail in the boring ways: half-copied tables, stale sequences, missing indexes. DBShifts moves the schema and every row, defers constraints for speed, reseeds counters, and proves the result with row counts and checksums.

Start MySQL → MySQL Migration

Free tier · no credit card

Not ready to connect a database? Paste your CREATE TABLE statements and see the MySQL schema now

Upgrading 5.7 to 8.0 changes the default character set and collation

MySQL 8.0 defaults to utf8mb4 with the utf8mb4_0900_ai_ci collation, where 5.7 defaulted to latin1. Tables you copy keep the character set they were declared with, but anything created on the new server without an explicit one gets the new default. Joining an old latin1 or utf8mb4_general_ci column to a new utf8mb4_0900_ai_ci one fails with 'Illegal mix of collations'.

That collation also does not exist on 5.7, so a dump taken from 8.0 cannot be restored onto, or replicated to, an older server without rewriting it. Decide the target collation before the move and set it on the database explicitly, rather than fixing tables one by one afterwards.

utf8 is three bytes, and the index limit bites when you fix it

In MySQL, utf8 means utf8mb3: at most three bytes per character, so emoji and some CJK characters cannot be stored. A same-engine move is the natural time to convert to utf8mb4, and the conversion is where index limits appear, because a VARCHAR(255) in utf8mb4 can need 1,020 bytes of index key.

InnoDB allows 3,072 bytes per index key with the DYNAMIC or COMPRESSED row format, the default since 5.7, but only 767 bytes with the older COMPACT and REDUNDANT formats. Tables created long ago may still use those, and converting them fails until the row format changes too.

Authentication changes break old clients before any query runs

MySQL 8.0 creates users with caching_sha2_password by default. Client libraries that only know mysql_native_password fail at connect time with 'Authentication plugin caching_sha2_password cannot be loaded', which looks like a network or password problem and is neither.

Check every driver that connects before the cutover, not after. Recreating users with mysql_native_password is only a stopgap: MySQL 8.4 no longer enables that plugin by default, so the lasting fix is upgrading the drivers.

MySQL → MySQL conversion notes

Engine-specific rules baked into the conversion and transfer pipeline — verified by live certification of this exact pair.

  • TINYINT(1) is treated as a boolean; plain TINYINT stays numeric — converting both blindly corrupts ratings and counters.
  • UNSIGNED integers are widened on targets without unsigned types, so values above the signed range survive.
  • ENUM and SET columns are converted with their value lists preserved (native enums, CHECK constraints, or arrays depending on the target).
  • TIME columns are durations (-838h..838h) at the driver level — DBShifts converts them per target instead of failing the batch.
  • Zero dates (0000-00-00) are normalized deterministically and reported, never silently dropped.

Frequently asked questions

Is MySQL to MySQL migration production-ready in DBShifts?

Yes. MySQL to MySQL is a certified pair: it passes the live certification suite on real MySQL and MySQL servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.

What changes in a same-engine MySQL migration?

Structurally nothing changes — types map one-to-one. The risks are operational: half-copied tables, sequences left pointing at 1, and indexes that never got rebuilt. DBShifts reseeds counters to MAX(id)+1, defers then rebuilds constraints and indexes, and proves the copy with row counts and checksums.

Can I keep MySQL and MySQL in sync after the initial migration?

Yes, until you cut over. DBShifts reads the row-based binary log (binlog_format = ROW). With zero-downtime mode on, the log position is captured before the first row is copied, so writes made during the copy are replayed afterwards.

Go deeper

Ready to move MySQL to MySQL?

Set up in under two minutes. Validation and rollback included.

Start Free Migration