Databases Restore from Production to Development

Hello Friends,

I am facing issue restoring the database from Production to Development, following are the steps which I took before I ran into trouble.

  1. Created a new Site (NewSite) on Development Server, due to which new db was created lets say DEV-DB-1
  2. Installed ERPNext app for this Site.
  3. Took db backup from Production Server, lets say PROD-DB.
  4. Create a new blank database on Development Server called it DEV-DB-2.
  5. Restored PROD-DB backup on blank DEV-DB-2.
  6. Made changes in site_config.json file of NewSite site.
  7. Updated the User in User & db table of mysql database.

Now when I try to hit the following command
bench --site NewSite mysql
it throws the below error.
ERROR 1045 (28000): Access denied for user ‘NewSite’@‘localhost’ (using password: YES)

I am sure I have not updated some specific file or table in db.

Thanks in Advance.

Create a new blank database on Development Server called it DEV-DB-2.

why two databases?

restore production data to DEV-DB-1

Hi,

1st database gets created as soon as I install ERPNext app for the site which will have some default data like COA, Customer, Supplier and many more masters which I do not want, 2nd database i.e DEV-DB-1 is where I restore the Production db. I will not be using the DEV-DB-1 at all.