Skip to content

Magento2 – Migrating the database from one server to another

I am in the process of migrating a Magento2 website from a single dedicated server to a split setup with Magento on one server and the Database on it’s own dedicated server.

What is the recommended approach with migrating the database?

I’ve read several articles but none of them discuss the compexities involving transactions, table spaces and SUPER privalidges?

They simply state mysqldump and import as if it’s incredibly straightforward – my experience with Magento2 as an ecommerce platform suggests this is not usually the case?

For example I have used this command to dump the live database:

mysqldump -u -p --no-tablespaces > mysqldump_live26082024.sql

Now when running the import command:

mysql -h -u -p  < mysqldump_live26082024.sql

I get the following error:

ERROR 1419 (HY000) at line 821: You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators v
ariable)

Is this a common problem or is it an issue caused by my MySQL configuration?

Any help is greatly appreciated.