• Resolved davidtube

    (@davidtube)


    I’ve moved my WordPress site to a new domain. The website and database still sit on the same servers so the configuration shouldn’t have changed.

    All the WordPress features are still running correctly but anywhere I have added my own SQL queries to the template code I get the following error message:

    “Warning: mysql_query(): Access denied for user ‘httpd’@’localhost’ (using password: NO) in…”

    My queries were working fine before I changed domain. For some reason they are no longer able to access the database but the WordPress code is able to.

    Does anyone know why the user is amused to be ‘httpd’@’localhost’ and how to change that to the username and server specified in my wp-config file?

    MySQL client version: 5.0.67

Viewing 1 replies (of 1 total)
  • Thread Starter davidtube

    (@davidtube)

    I’ve cracked it! It’s only taken me 2 weeks. Basically I had recently added a piece of code to the header which was trying to establish a second database connection. I got rid of that and everything is working perfectly. The fact I’d changed domains had nothing to do with it. It just added to the confusion.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress can access my database, but my queries can't’ is closed to new replies.