You are here
Solutions - Tue, 2022/11/15 - 21:10
I am trying an installation, first created the database, then the user with full privileges, I am sure that everything is done correctly, but when accessing the database, it does not allow access.
The error is shown as:
Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'user001'@'localhost' (using password: YES) in /var/www/wordpress/installfolder/lib/dml/mysqli_native_moodle_database.php on line 79
I restarted MySQL and rebooted the debian server, but no luck to make it work.
Any suggestions?
Thanks,
Forum:
Have you tested logging in as the new user?
It sounds like you are fairly confident that you have set up the new MySQL user correctly, but have you double checked that you have log into MySQL with your new user?
I.e.:
Try logging in like this:
It should ask for your password and if everything is as it should be, you should be dropped into a mysql session. I.e. it should look something like this:
If that doesn't work, then there is something wrong with your user or database. FWIW, this should create a new DB 'new_db_name' owned by a new user 'user001' (I set variables first so it's easy to reuse in your specific scenario - just change the first 3 lines for your purposes):
If the above does work (or you recreate it and confirm it works) and your app still doesn't work, please double check the username and password that your app is using.
If you can confirm all the above is as it should be, then my remaining guess is some "special character" in the password (e.g. a punctuation mark) that isn't being processed properly. Perhaps retry with a long random string of "normal" characters. E.g. an mcookie:
I hope that helps. If you continue to have issues, perhaps share more about the app you are trying to install?
Add new comment