Results 1 to 5 of 5

Thread: Wordpress can't see database

  1. #1

    Join Date
    Jan 2002
    Location
    Florida
    Posts
    66
    Rep Power
    17

    Wordpress can't see database

    I'm having some odd behavior. For a while my site has been showing the wordpress content, but unthemed as if the theme was broken. I was getting a 500 error trying to connect to the Admin page, so I decided that I needed to re-install wordpress and rebuild the site from scratch.

    Funny thing is I re-uploaded the files from my test environment... the front end still looks the same, but now I'm getting this message from the admin page:

    "We were able to connect to the database server (which means your username and password is okay) but not able to select the <database name> database.

    Are you sure it exists?
    Does the user <name> have permission to use the <database name> database?
    On some systems the name of your database is prefixed with your username, so it would be like username_<database name>. Could that be the problem?"

    The answers to these is "Yes". I reset the password to be sure, and checked the user permissions on the database in phpMyAdmin, it has full access. Any ideas?

  2. #2
    Former Spam Filter (EU) IanS's Avatar
    Join Date
    Mar 2004
    Location
    Washington (THE original UK one!)
    Posts
    12,964
    Rep Power
    30
    Absolute v relative paths.

    I know nothing about MySQL other than what I've read on here over many years, but when people move from a 'test' environment to a live site it isn't unusual for a path to be wrong.

    Check them, is all I'm suggesting!
    This is a Powweb customer
    helping Powweb customer forum.

    I am a customer just like you!!

    Some matters can only be answered by staff or support.
    Give it a go - ask here first!

  3. #3

    Join Date
    Jan 2002
    Location
    Florida
    Posts
    66
    Rep Power
    17
    Well, the problem started before I attempted the move... but I did confirm that the server name is what it should be per the MySQL admin panel. Also, on further investigation, it turns out that the front end wasn't really working, that it was just cached content... I turned off the caching in .htaccess in case I had locked myself out by accident, and I find now the whole site is giving me a "cannot access database" error.

  4. #4

    Join Date
    Jan 2002
    Location
    Florida
    Posts
    66
    Rep Power
    17
    New update... Database connection problem is fixed, I had accidentally inserted a space in the name when I was double checking values and settings. Front end looks great, however, I'm back to my 500 error in the admin!

  5. #5
    Mod.. with bite.. Croc Hunter's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    7,334
    Rep Power
    27
    Sounds like a path issue or different version of Wordpress to database. Usually the latter will prompt you to update the database automatically so check the path in database through phpMyAdmin. Also, next time if you just delete the .htaccess file Wordpress will prompt you to create a new one.
    Croc Hunter MSC :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •