Hi
I am able to replicate this issue.
I have found this issue on EL9 distributions when using MariaDB Connector.
After pinning down the issue to the MariaDB Connector, and after overcoming the issue, I found that PyMySQL
used by frappe is throwing the same error.
pymysql.err.OperationalError: (1045, "Access denied for user 'root'@'10.0.0.1' (using password: YES)")
Long story made short, and in the end I’ll add some links:
Installed new RockyLinux9 machine, compiled and installed python3.11 from the sources, installed everything including mariadb-connector-c, installed bench, creating new site fails with said error.
Created a shell script to test the connection to the MariaDB Server. Script always connects successfully.
Created a python script for the same purpose: fails.
(importing mariadb on the script not pymysql)
Installed MariaDB connector C 3.2.6 from Repo. Installed MariaDB python connector v1.0.11 fails
compiled from source connector 3.3.10 and mariadb python connector 1.1.10: fails
Another machine with AlmaLinux 9 instead of going for Python from sources I tried with Python3.9 from the OS.
Installed pip and the MariaDB Connector 3.2.6 fails
connector 3.3.10 fails.
By then I was only testing my script. Shell script always succeeds, Python always fails with this same error.
I have tried installing Python3.11 from the sources Python3.11 from the repos, and Python3.9 from the repos. Connecting via Python always fails.
Another test, I did another AL9 vm installed Python3.11 from the repos BUT instead of installing anything MariaDB I installed mysql client and libraries. I also installed mysql-connector-python instead of MariaDB.
Result:
Test script connects to DB successfully.
Testing with Frappe Framework on this very same environment:
PyMySQL
fails. Python script which imports mysql.connector
works correctly.
Topics I’ve created while following this problem:
Frappe Forums - bench: new installation & database issues
Python Forums - Issue with python3.11 connector on EL9