Update error from version 8 to 9 1045, "Access denied for user '8188197692de12cc'@'localhost' (using password: YES)"

Hello Everyone,

I have error while updating ERPNext from version 8.3.5 to the latest version (9.2.x).
I have no idea what _mysql_exceptions.OperationalError: (1045, "Access denied for user '8188197692de12cc'@'localhost' (using password: YES)") means.

I really really need your help. This is the production installment.

Thank you very much for your help

ims@ubuntuserver:~/fb$ sudo bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
Cannot proceed with update: You have local changes in app "erpnext" that are not committed.
Here are your choices:
1. Merge the erpnext app manually with "git pull" / "git pull --rebase" and fix conflicts.
1. Temporarily remove your changes with "git stash" or discard them completely
        with "bench update --reset" or for individual repositries "git reset --hard"
2. If your changes are helpful for others, send in a pull request via GitHub and
        wait for them to be merged in the core.
ims@ubuntuserver:~/fb$ sudo bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 5927c67 Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 84a44f7 Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling dashboard
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 50bea99 Update README.md
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/ims/erpnext/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe-coba-baru/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/dashboard/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
Updating node libraries...
INFO:bench.utils:npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN frappe@ No description
Backing up sites...
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
    main()
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py", line 289, in backup
    odb = scheduled_backup(ignore_files=not with_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, backup_path_private_files=backup_path_private_files, force=True)
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/backups.py", line 166, in scheduled_backup
    odb = new_backup(older_than, ignore_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, force=force)
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/backups.py", line 176, in new_backup
    odb.get_backup(older_than, ignore_files, force=force)
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/backups.py", line 48, in get_backup
    self.set_backup_file_name()
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/backups.py", line 63, in set_backup_file_name
    todays_date = now_datetime().strftime('%Y%m%d_%H%M%S')
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/data.py", line 122, in now_datetime
    dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/data.py", line 145, in convert_utc_to_user_timezone
    return utcnow.astimezone(timezone(get_time_zone()))
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/data.py", line 139, in get_time_zone
    return frappe.cache().get_value("time_zone", _get_time_zone)
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 72, in get_value
    val = generator()
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/data.py", line 133, in _get_time_zone
    return frappe.db.get_system_setting('time_zone') or 'Asia/Kolkata'
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 859, in get_system_setting
    return frappe.cache().get_value("system_settings", _load_system_settings).get(key)
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 72, in get_value
    val = generator()
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 858, in _load_system_settings
    return self.get_singles_dict("System Settings")
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 543, in get_singles_dict
    tabSingles where doctype=%s""", doctype))
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 121, in sql
    self.connect()
  File "/home/ims/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 67, in connect
    use_unicode=True, charset='utf8mb4')
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 86, in Connect
    return Connection(*args, **kwargs)
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 204, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, "Access denied for user '8188197692de12cc'@'localhost' (using password: YES)")

seems like common issue with MariaDB connection whatever upgrade or fresh install.
https://discuss.erpnext.com/t/install-failure-ubuntu-16-04/31448/7

Finally, the problem solved!

In MySQL command:

set password for 'database-name'@'localhost' = password('new-password');

Then, I edited the site_config.json
{
“db_name”: “database-name”,
“db_password”: “new-password”,
“developer_mode”: 0,
“encryption_key”: “encryption-key”,
“limits”: {
“space_usage”: {
“backup_size”: 11.0,
“database_size”: 23.1,
“files_size”: 7.0,
“total”: 41.1
}
}
}

Then I re-run bench update --reset

Thank God! I’m very lucky today :grin:

2 Likes