Database connection error 1045
jordane45 Posted messages 30426 Registration date Status Moderator Last intervention -
Hello,
I'm having trouble deploying even a very simple display that retrieves information from a database with a single table and shows it in my browser. I keep encountering the following or similar connection error because I often change users to connect to the database with a password.
Connection or data retrieval error: SQLSTATE[HY000] [1045] Access denied for user 'besteacher_user'@'localhost' (using password: YES)
Knowing that the user has all the access and privileges, how can I resolve my issue since it greatly hinders me in the sense that I can no longer deploy anything and therefore cannot work on any project?
2 answers
Hello,
To start... you should indicate which DBMS you are working with... not all databases work the same way.
Don't forget to specify its version..
Next, do you have this message via code? You should show it
And are you able to access the database using a tool like DBeaver, HeidiSQL.. or simply via command line?
What have you tried?
.
Best regards,
Jordane
As a DBMS, I am using: Maria DB, the fork of MySQL, and the database I want to use was created directly on phpMyAdmin.
Version: 10.4.32-MariaDB - mariadb.org binary distribution
Complete error returned: Connection or data retrieval error: SQLSTATE[HY000] [1045] Access denied for user 'besteacher_user'@'localhost' (using password: YES)
List of Teachers
No teachers found in the database.
Because I set in my code that if the connection to the database is denied, it pretends not to have found a teacher to avoid another error at that level.
I can access my database with DBeaver, but I can't do it via command line; I always encounter the following error:
C:\Users\Alain Leroy>mysql -u besteacher_user -p
Enter password: **********
ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: The specified module could not be found. Library path is 'caching_sha2_password.dll'
I don't understand why; I really need help. I have been stuck on this error for nearly two weeks now.
Have you looked for this error online?
For example, check here: https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded
or this one: