ERPNext.com 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 https://github.com/fauzdar1/erpnext.git.

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 crm.mysite.in 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/site.py”, line 190, in install_app
_install_app(app, verbose=context.verbose)
File “/opt/bench/erpnext/apps/frappe/frappe/installer.py”, line 128, in install_app
frappe.clear_cache()
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 696, in clear_cache
frappe.cache_manager.clear_user_cache()
File “/opt/bench/erpnext/apps/frappe/frappe/cache_manager.py”, line 48, in clear_user_cache
clear_global_cache()
File “/opt/bench/erpnext/apps/frappe/frappe/cache_manager.py”, line 59, in clear_global_cache
clear_website_cache()
File “/opt/bench/erpnext/apps/frappe/frappe/website/utils.py”, line 331, in clear_website_cache
clear_cache(path)
File “/opt/bench/erpnext/apps/frappe/frappe/website/utils.py”, line 327, in clear_cache
for method in frappe.get_hooks(“website_clear_cache”):
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 1106, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/opt/bench/erpnext/apps/frappe/frappe/utils/redis_wrapper.py”, line 80, in get_value
val = generator()
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, 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/init.py”, line 1044, in get_installed_apps
installed = json.loads(db.get_global(“installed_apps”) or “[]”)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 705, in get_global
return self.get_default(key, user)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 709, in get_default
d = self.get_defaults(key, parent)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 727, in get_defaults
defaults = frappe.defaults.get_defaults(parent)
File “/opt/bench/erpnext/apps/frappe/frappe/defaults.py”, line 76, in get_defaults
globald = get_defaults_for()
File “/opt/bench/erpnext/apps/frappe/frappe/defaults.py”, line 194, in get_defaults_for
res = frappe.db.sql("""select defkey, defvalue from tabDefaultValue
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 113, in sql
self.connect()
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 65, in connect
self._conn = self.get_connection()
File “/opt/bench/erpnext/apps/frappe/frappe/database/mariadb/database.py”, line 74, in get_connection
conn = pymysql.connect(
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/connections.py”, line 353, in init
self.connect()
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/connections.py”, line 633, in connect
self._request_authentication()
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/connections.py”, line 907, in _request_authentication
auth_packet = self._read_packet()
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “/opt/bench/erpnext/env/lib/python3.8/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, “Access denied for user ‘_e0cbef127db517ad’@‘localhost’ (using password: YES)”)

Versions:

  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?