0

WP version 5.5.3 - updated days ago php version 7.3.24 running locally on server Can not create a backup using duplicator Occours bothi inside WP admin pages, so internal connections and external through php requests

I am suddenly receiving the following error but have not made any changes to any file on the server, nor within wp itself -

WordPress database error: [Access denied for user 'database-name'@'localhost' (using password: YES)] .

THIGNS I HAVE DONE TO FIX - I have verified the wpconfig password and the db password match. I actually re-updated the db by copying the password listed in the wpconfig file and pasting it to the db. Searched a lot of solutions on here checked that the db is up and running by logging in using MYPHPADMIN

What am I missing and how do I get to the root of the issue that is causing this? No console errors are shown.

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
Mikey
  • 23
  • 6
  • I don't know why it would spontaneously change on you, but it could be different host fields. In MySQL, there can exist more than one user with the same username but different host entries. Those different accounts can have different permissions and different passwords. Even the wildcard (`%`) host doesn't apply to socket connection (which are indicated by using host name 'localhost' in your connection string, or the error message you've posted above). I suggest trying to change your connection string to connect to host '127.0.0.1' instead of 'localhost' as a test to see if there's any change. – Isaac Bennetch Nov 27 '20 at 02:55
  • Also, I'm a slight bit confused here, so just to be certain - you are able to connect successfully through phpMyAdmin using the same username and password that you've defined in the WordPress configuration, right? But WP doesn't work and phpMyAdmin does? Check the connection settings in phpMyAdmin to make sure you're using the same hostname or IP address and also network port in the WordPress configuration. – Isaac Bennetch Nov 27 '20 at 02:57

1 Answers1

0

Have you considered the possibility of for the likes of using an online SQL instance such as AWS RDS, given the correct permissions for the database to be accessed, or are you running it locally?

Louie
  • 57
  • 1
  • 8
  • running locally on my server. DB is fully searchable and can be connected to in MYPHPADMIN, just not through the WP amdin panel. Also can not build a backup since it is rejecting the connection to the db. – Mikey Nov 24 '20 at 18:17
  • I removed the db name so it wouldnt be public. Any and all references like that are what WP set up itself months ago. – Mikey Nov 24 '20 at 18:19
  • @Mikey Have you had a look at this https://stackoverflow.com/questions/20353402/access-denied-for-user-testlocalhost-using-password-yes-except-root-user – Louie Nov 24 '20 at 18:28
  • different issue on that stack but thank you. I am not installing anything and this was an existing and working set up – Mikey Nov 24 '20 at 21:58
  • What does it mean "Fully searchable", are you using the credentials from the wpconfig for that? Are you accessing phpmyadmin with root or with wpconfig credentials? – Hendrik Vlaanderen Nov 24 '20 at 22:52
  • meaning I can view it and look through all the tables etc. Views doesnt work. Keeps throwing errors about deined like above. Logging in through myphpadmin and mysql workbench. Same result. – Mikey Nov 24 '20 at 23:49
  • @Mikey It sounds like a permission problem. By when you say you have the SQL instance setup locally, is that being on your local machine or on a VPS or shared hosting with a provider...? – Louie Nov 25 '20 at 07:43