cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.5-p1 (Host A) to Magento 2.3.7 (Host B)

Magento 2.3.5-p1 (Host A) to Magento 2.3.7 (Host B)

I currently have a Magento 2.3.5-p1 installation on host A. I need to move the data ( /app/* & database) to a new/clean Magento 2.3.7 installation on host B. I'm having a difficult time figuring out how to get the database form host A to host B. Running into constant errors when trying to import the database on host B via command line or PHPmyadmin.

 

What is the best approach under this scenario?

3 REPLIES 3

Re: Magento 2.3.5-p1 (Host A) to Magento 2.3.7 (Host B)

Hello @aglasser1 ,

You didn't share the steps you used to export and import and what error you faced ?

please find below method to export from your old server : 

Navigate to any folder and run this command :
mysqldump -u YourUser -p YourDatabaseName > wantedsqlfile.sql

Move the wantedsqlfile.sql to your new server :

Run below commands in new server where your sql file is placed  :

mysql -u user -p
(Enter password)
create database YOUR_NEW_DATABASE_NAME;
use YOUR_NEW_DATABASE_NAME;
source wantedsqlfile.sql;

and then update your app/etc/env.php with new db details (username, password, db-name).

 

Hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !

Re: Magento 2.3.5-p1 (Host A) to Magento 2.3.7 (Host B)

@gaurav_harsh1 


On host A I did:

mysqldump -u dbusername -p dbname > host_a_dump.sql

On host B I did:

mysql -u newdbusername -p newdbname < host_a_dump.sql

Error was:

Can't create table `newdbname`.`soft_catalog_product_bundle_price_index` (errno: 121 "Duplicate key on write or update")

Re: Magento 2.3.5-p1 (Host A) to Magento 2.3.7 (Host B)

Hello @aglasser1 ,

 

It looks like some tables are modified in the new version, check first that which foreign key of which table it's referring to !

Looks like you have two CONTRAINTS on different tables with the same name.

Check this issue once : 

https://magento.stackexchange.com/questions/264581/foreign-key-constraint-is-incorrectly-formed-afte...

 

Hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !