Frappe Cloud Support Partners Foundation Frappe School

"Access denied for user '_e0cbef127db517ad'@'localhost' (using password: YES)") While setting site

I’m installing ERPNext on a new Ubuntu VPS using this article and instead of cloning ERPNext’s git, I’m using mine, forked from ERPNext which hasn’t been changed for now using command bench get-app erpnext

I’m facing the issue mentioned in the below log which contains a strange username I’m not aware of. Mysql has a password, I ran a query to select all available users and only one user is available root at localhost.

The log from command bench --site install-app erpnext:
An error occurred while installing erpnext: (1045, “Access denied for user ‘_e0cbef127db517ad’@‘localhost’ (using password: YES)”)
Traceback (most recent call last):
File “/opt/bench/erpnext/apps/frappe/frappe/commands/”, line 190, in install_app
_install_app(app, verbose=context.verbose)
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 128, in install_app
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 696, in clear_cache
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 48, in clear_user_cache
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 59, in clear_global_cache
File “/opt/bench/erpnext/apps/frappe/frappe/website/”, line 331, in clear_website_cache
File “/opt/bench/erpnext/apps/frappe/frappe/website/”, line 327, in clear_cache
for method in frappe.get_hooks(“website_clear_cache”):
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 1106, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/opt/bench/erpnext/apps/frappe/frappe/utils/”, line 80, in get_value
val = generator()
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 1080, in load_app_hooks
for app in [app_name] if app_name else get_installed_apps(sort=True):
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 1044, in get_installed_apps
installed = json.loads(db.get_global(“installed_apps”) or “[]”)
File “/opt/bench/erpnext/apps/frappe/frappe/database/”, line 705, in get_global
return self.get_default(key, user)
File “/opt/bench/erpnext/apps/frappe/frappe/database/”, line 709, in get_default
d = self.get_defaults(key, parent)
File “/opt/bench/erpnext/apps/frappe/frappe/database/”, line 727, in get_defaults
defaults = frappe.defaults.get_defaults(parent)
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 76, in get_defaults
globald = get_defaults_for()
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 194, in get_defaults_for
res = frappe.db.sql("""select defkey, defvalue from tabDefaultValue
File “/opt/bench/erpnext/apps/frappe/frappe/database/”, line 113, in sql
File “/opt/bench/erpnext/apps/frappe/frappe/database/”, line 65, in connect
self._conn = self.get_connection()
File “/opt/bench/erpnext/apps/frappe/frappe/database/mariadb/”, line 74, in get_connection
conn = pymysql.connect(
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/”, line 353, in init
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/”, line 633, in connect
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/”, line 907, in _request_authentication
auth_packet = self._read_packet()
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/”, line 725, in _read_packet
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/”, line 221, in raise_for_error
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, “Access denied for user ‘_e0cbef127db517ad’@‘localhost’ (using password: YES)”)


  1. Ubuntu is 20.04.
  2. Python is 3.8.10

Please provide a working solution.

Hi ,

What does the command whoami , in a terminal return?
Does bench mariadb enter into a database session successfully?