Bench migration error

#bench migrate
after restore database and copy site_config.json from old server

Migrating site1.local
    Traceback (most recent call last):
      File "/usr/lib/python2.7/", line 174, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
      File "/usr/lib/python2.7/", line 72, in _run_code
        exec code in run_globals
      File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 94, in <module>
      File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 18, in main
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 697, in main
        rv = self.invoke(ctx)
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 535, in invoke
        return callback(*args, **kwargs)
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 17, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/", line 24, in _func
        ret = f(frappe._dict(ctx.obj), *args, **kwargs)
      File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/", line 217, in migrate
        migrate(context.verbose, rebuild_website=rebuild_website)
      File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 31, in migrate
      File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/", line 24, in run_all
        executed = [p[0] for p in frappe.db.sql("""select patch from `tabPatch Log`""")]
      File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 123, in sql
      File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 69, in connect
        use_unicode=True, charset='utf8mb4')
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 86, in Connect
        return Connection(*args, **kwargs)
      File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 204, in __init__
        super(Connection, self).__init__(*args, **kwargs2)
    _mysql_exceptions.OperationalError: (1045, "Access denied for user '1bd3e0294da19198'@'localhost' (using password: YES)")

@rmehta @nabinhait
Dear All

Any suggesting for that error

The error says access denied to connect to mysql. Not sure about site name and password in you old and new instance. You just need to copy the encryption key from the old site config.

Thanks for your response
as i mentioned i’m already copy the site_config.json from old site but still got the error but the site name is different


Please check the mysql service & check log.


Thanks for your response
mysql service is run but how can i check log

Do not copy entire file, just copy the encryption key from old config and paste in new config.

Okay but i have no config file in the new site my be because i’m not start the setup wizard i just restore the backup directly after fresh installation

Site config is created when you do bench new-site command. By default it will have the db name and password field.