Try ERPNext Buy Support Partners Foundation

pymysql.err.OperationalError: (1045, "Access denied for user 'frappe'@'172.18.0.2' (using password: NO)")

I configure multi bench on ubuntu 20.04 and every thing goes smooth when i execute the run command

docker run -e "MAINTENANCE_MODE=1" -v erpnext_sites-vol:/home/frappe/frappe-bench/sites --network webproxy frappe/erpnext-worker:version-12 migrate

i’m getting access denied error although i have setup root password for maria db server in .env file and haven’t setup frappe user for database upon running above ammand i’m getting following response

Migrating Traceback (most recent call last): File "/home/frappe/frappe-bench/commands/migrate.py", line 51, in <module> main() File "/home/frappe/frappe-bench/commands/migrate.py", line 44, in main migrate_sites() File "/home/frappe/frappe-bench/commands/migrate.py", line 35, in migrate_sites migrate() File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 40, in migrate clear_global_cache() File "/home/frappe/frappe-bench/apps/frappe/frappe/cache_manager.py", line 54, in clear_global_cache clear_website_cache() File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 322, in clear_cache frappe.clear_cache("Guest") File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 588, in clear_cache frappe.cache_manager.clear_user_cache(user) File "/home/frappe/frappe-bench/apps/frappe/frappe/cache_manager.py", line 32, in clear_user_cache clear_notifications(user) File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 120, in clear_notifications config = get_notification_config() File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 200, in get_notification_config return frappe.cache().hget("notification_config", user, _get) File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 186, in hget value = generator() File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 180, in _get hooks = frappe.get_hooks() File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 968, in get_hooks hooks = _dict(cache().get_value("app_hooks", load_app_hooks)) File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 79, in get_value val = generator() File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 942, in load_app_hooks for app in [app_name] if app_name else get_installed_apps(sort=True): File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 906, in get_installed_apps installed = json.loads(db.get_global("installed_apps") or "[]") File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 702, in get_global return self.get_default(key, user) File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 706, in get_default d = self.get_defaults(key, parent) File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 724, in get_defaults defaults = frappe.defaults.get_defaults(parent) File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 77, in get_defaults globald = get_defaults_for() File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 204, in get_defaults_for where parent = %s order by creation""", (parent,), as_dict=1) File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql self.connect() File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 75, in connect self._conn = self.get_connection() File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 90, in get_connection local_infile = frappe.conf.local_infile) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/__init__.py", line 94, in Connect return Connection(*args, **kwargs) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 325, in __init__ self.connect() File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 599, in connect self._request_authentication() File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 861, in _request_authentication auth_packet = self._read_packet() File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 684, in _read_packet packet.check_error() File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.OperationalError: (1045, "Access denied for user 'frappe'@'172.18.0.2' (using password: NO)")

I don’'t know why mysql denies access,

last test did migration successfully in docker https://travis-ci.com/github/frappe/frappe_docker/jobs/443607463

i’m facing that problem and i haven’t found any solution to resolve that i followed Multi bench please guide me to solution