[Warning] Access denied for user '_5e5899d8398b5f7b'@'172.18.0.7' (using password: YES)

good day
please assist me.
I am a total novice regarding using docker and accessing the code and understanding it, so please just lead me in the right direction where to look and update the password too the correct one
i use windows and docker to run the frappe server.

did you try troubleshoot? frappe_docker/docs/troubleshoot.md at main · frappe/frappe_docker · GitHub

with my knowledge it is a challenge unfortunately.
where do execute the info in troubleshoot document?
where do i type the below instruction after changing to corresponding info as per troubleshoot instructions?

docker exec -it frappe_docker-backend-1 bash
mysql -uroot -padmin -hdb

it seems i need docker debug, but this is only available on a paid subscription?

The commands are executed from terminal in bash shell. It assumes you’re using Linux.
For Mac or Windows things can be different. Hope someone who uses Mac or Windows user help you. I recommend use Linux or get a Linux VM on a cloud if you wish to learn these things. If not, just use frappecloud, it’ll take care of everything for you.

docker exec is part of docker command which is free. It is also part of podman command as podman exec.

Hi, this issue is not caused by the password itself. If you’re using mariadb, it is sensitive to the host address. For a reason a ignore, anytime you restart erpnext, the host ip associated with the database user created by ERPnext changes. What you can do is log into your mariadb server and run this command to untie the user to a particular host:

RENAME USER ‘_5e5899d8398b5f7b’@‘172.18.0.7’ TO ‘_5e5899d8398b5f7b’@‘%’;

It should resolve your problem. If you’re still facing the same issue, then delete the user from the database server, delete the database created by ERPnext as well, and restart the installation.

hi @Thevoice. excuse my ignorance. explain to as if I am 5 Years old how I log into
mariadb server? do I use docker desktop itself and use the terminal?
or am I supposed to use another interface like windows terminal, or ubuntu via windows terminal? or even visual studio?
I tried your recommendation in DOCKER terminal, but result comes back saying it does not recognise
RENAME USER

If your installation uses docker, then you must do it using the docker terminal.

1. Find the MariaDB Container

  1. Open your terminal and list the running Docker containers to identify the name or ID of the MariaDB container using the command: docker ps

Look for a container with a name that suggests MariaDB or MySQL.


2. Access the MariaDB Container Terminal

  1. Once you have the container name or ID, access its terminal with this command: docker exec -it container_name_or_id bash

Replace container_name_or_id with the actual name or ID of your MariaDB container.


3. Log Into MariaDB

  1. Inside the container, use the MariaDB client to log in using the command: mysql -u root -p

Replace root with the username of the MariaDB user if you’re using a different account.

  1. Enter the password for the root user (or the specific database user you’re using) when prompted. This password is usually defined in your docker-compose.yml file or environment variables.
1 Like

thank you @Thevoice
below is what i did, I entered RENAME USER.
There were no complaints though. do I assume that i completed your request successfully?

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https ://aka.ms/pscore6

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c2343bb2ecc6 frappe / erpnext:v15.42.0 “nginx-entrypoint.sh” 30 hours ago Up About an hour 0.0.0.0:8080->8080/tcp frappe_docker-main-frontend-1
22c86559d026 mariadb:10.6 “docker-entrypoint.s…” 30 hours ago Up 14 minutes (healthy) 3306/tcp frappe_docker-main-db-1
3973c84a2536 frappe/ erpnext: v15.42.0 “bench worker --queu…” 30 hours ago Up About an hour frappe_docker-main-queue-short-1
a39fe05ee4f8 redis:6.2-alpine “docker-entrypoint.s…” 30 hours ago Up About an hour 6379/tcp frappe_docker-main-redis-queue-1
b4e4436bada1 frappe/erpnext:v15.42.0 “bench worker --queu…” 30 hours ago Up About an hour frappe_docker-main-queue-long-1
de63a095d217 frappe/erpnext:v15.42.0 “/home/frappe/frappe…” 30 hours ago Up About an hour frappe_docker-main-backend-1
271b4dc8d19f redis:6.2-alpine “docker-entrypoint.s…” 30 hours ago Up About an hour 6379/tcp frappe_docker-main-redis-cache-1
1edcc57bb2f1 frappe/erpnext:v15.42.0 “bench schedule” 30 hours ago Up About an hour frappe_docker-main-scheduler-1
6e4b9a85d041 frappe/erpnext:v15.42.0 “node /home/frappe/f…” 30 hours ago Up About an hour frappe_docker-main-websocket-1
PS C:\Users\samantha> docker exec -it container_ bash^C
PS C:\Users\samantha> docker exec -it container_22c86559d026 bash

What’s next:
Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug container_22c86559d026
Learn more at https: / /docs.docker.com/go/debug-cli/
Error response from daemon: No such container: container_22c86559d026
PS C:\Users\samantha> docker exec -it container22c86559d026 bash

What’s next:
Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug container22c86559d026
Learn more at https:/ / docs.doc ker .co m/go /debug-cli /
Error response from daemon: No such container: container22c86559d026
PS C:\Users\samantha> docker exec -it 22c86559d026 bash
root@22c86559d026:/# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
root@22c86559d026:/# ^C
root@22c86559d026:/# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
root@22c86559d026:/# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \ g.
Your MariaDB connection id is 1364
Server version: 10.6.20-MariaDB-ubu2004 mariadb .org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> RENAME USER ‘_5e5899d8398b5f7b’@‘172.18.0.7’ TO ‘_5e5899d8398b5f7b’@‘%’
→ RENAME USER _5e5899d8398b5f7b’@‘172.18.0.3 TO _5e5899d8398b5f7b’@‘%

Your command seems to be missing a “;” .After running it, type this command:

SELECT User, Host FROM mysql.user;

to verify if there is still an IP address linked to the user. If there is only %, then you completed it successfully and should just restart your erpnext installation.

@Thevoice
Your help is Genuinely appreciated. I will work on it again soon and keep you posted.

for your info.

First time I installed ERP Next it worked perfectly, I then did something, fiddled and it stopped working.
Deleting all the containers, images etc. Reinstalling everything does not solve the issue. I tried this multiple times. it seems like somewhere it could be keeping info that doesn’t erase when reinstalling.

if you already installed ERPnext and trying to install it again, the issue is most likely caused but the old database from the previous installation since ERPNext Reuse the same database name and user name. To fix this, you need to follow the previous steps to log into the mariadb server and then type these 3 commands to delete the previous database and user left by ERPnext:

DROP DATABASE _5e5899d8398b5f7b;
DROP USER ‘_5e5899d8398b5f7b’@‘%’;
FLUSH PRIVILEGES;

After that, exit the container, Stop the ERPnext and run this following command to delete all volumes and images:

docker system prune -a

after that, reinstall your ERPnext and you should be fine.

@Thevoice

here is the current situation below:

MariaDB [(none)]> SELECT User, Host FROM mysql.user;
±------------±----------+
| User | Host |
±------------±----------+
| root | % |
| healthcheck | 127.0.0.1 |
| healthcheck | ::1 |
| healthcheck | localhost |
| mariadb.sys | localhost |
| root | localhost |
±------------±----------+
6 rows in set (3.005 sec)

MariaDB [(none)]>

host is now showing % for user. ERP NEXT STILL DIDNT START.
Ive also followed your request to drop database, drop user, flush privileges.
then docker system prune -a.
and then reinstalling ERP NEXT.
I still get the acces denied error with mariadb.

Access denied for user ‘_5e5899d8398b5f7b’@‘172.18.0.4’ (using password: YES)

where do I look next?

FYI. in the browser when connecting to port:8080 i get the following.

Internal Server Error

the below error also shows up in the log of the back end conainer.

pymysql.err.OperationalError: (1045, “Access denied for user ‘_5e5899d8398b5f7b’@‘172.18.0.11’ (using password: YES)”)

This seems like you followed my previous instructions and deleted the database and user from mariadb. Now before running ERPnext again, you have to clean up docker by deleting the old installation files, images and volumes of ERPnext.

First stop ERPnext and run these commands one by one.

docker volume pune -a

docker image prune -a

docker system prune -a

after that reinstall ERPnext

did what you asked, i noticed that there are still actual images and containers left in docker.
should they not dissapear?

yes, they should all disappear, some of them still carry the old config files, you need to delete all of them before reinstalling erpnext

thank you again for your patience!!
will uninstalling docker completely, and reinstalling docker again not solve this issue?
I assumed doing that will install a completely new instance of erp next.
I’ve tried those multiple times also but still no good result. does docker store the databases somewhere that does not get removed when uninstalling docker itself?

Yes, you can uninstall and reinstall docker, it will delete all docker files from your system