“Invalid query: Access denied”: WP is using wrong username
-
One of my WP sites was broken–apparently–by a forced security update by my hosting provider. After that issue was resolved by an edit of .htaccess, the site reverted to content from about a year ago and to WP version 3.6. My first attempt to fix that by updating (in the dashboard) to the current WP version resulted in this error sent the the browser:
Invalid query: Access denied for user 'tcarney'@'localhost' (using password: NO) Whole query: SELECT count(*) AS 'count' FROM
wp_postsWHERE
post_type = ‘dc_surveyme’;`I can’t get beyond that error. Subsequent attempts to even go to the site in a browser results in the same error.
I’ve been monkeying with a number of possible fixes, all without access to the dashboard (changing PHP versions, forcing WP to use a different theme, etc.). I’ve checked and double checked wp-config.php. The user it specifies is
tcarney_wrdp3
for the database of the same name (I have several sites on the shared-hosting account). That’s the DB the site has been using now since 2013. ‘tcarney’ is the user for the domain as a whole, and the username for cpanel, FTP, etc. It is **not** the login admin username for the site (the one used to access the WP dashboard).So then how and why when I try to go to to the site (w7dta.org) I get the error message above that indicates it’s trying to use
'tcarney'@'localhost'
to access the database? Why it fails to do so is no mystery: that username is not an authorized user for any of my SQL databases, for WP or otherwise. So where did whatever code is constructing that query get the idea it’s a valid username?Any thoughts? Possible fixes? Thanks.
- This topic was modified 5 years, 10 months ago by .
- This topic was modified 5 years, 10 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘“Invalid query: Access denied”: WP is using wrong username’ is closed to new replies.