I’m trying to copy the database data from my production Magento 2.3.2 site to a local development site.
I created a backup of my production MySQL database with phpmyadmin like in the screenshot below.
Then on my local server, I created a new database named
magento and restored my production database (named
ad2f5134_newlive) into it with
mysql -u root -p magento < ad2f5134_newlive.sql
Then I updated the URLs in
core_config_data for my local development site.
The problem is that no products show up on my local development site. When I go to Catalog > Products in the Admin section, I get this message:
catalog_product_entity on my local development site, and all the products from my production site are in the table.
One thought I had is that it is an indexer problem, so I ran
bin/magento indexer:reindex. That gives me the following error:
General error: 1449 The user specified as a definer ('ad2f5134_newlive'@'%' does not exist...
So my two questions are:
- Why are no products on the site — even though they are in the database — and why don’t any products show up in the Admin section under Catalog > Products?
- The user
ad2f5134_newliveis the database user from my production site. Something in the database must now be telling my local development site to be using the
ad2f5134_newliveuser to run those reindexing queries. How do I change that user to by my local user?