www.webdeveloper.com
Results 1 to 8 of 8

Thread: Wordpress - Error establishing a database connection

  1. #1
    Join Date
    Aug 2008
    Posts
    204

    Wordpress - Error establishing a database connection

    Hello, I had wordpress setup and running fine. After having my database name changed which I assume caused this error, I'm not recieving this error now I want to fix it without wordpress not loading or me having to do a new install of wordpress which I can't afford.

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    just go back to your wordpress docs. somewhere in there it'll tell you where the file that contains your db name is. just update the value in there.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  3. #3
    Join Date
    Feb 2006
    Posts
    198
    also check the username and password for connecting to the db

  4. #4
    Join Date
    Aug 2008
    Posts
    204
    I don't want to have to reinstall wordpress or something messes up. What do I check and where ? If I just open up the WP-config.php file this could cause wordpress to mess up and have to reinstall and I can't have this happen. Argh no one knows how to fix, I've asked a few and they just don't know yet one person whom I spoke to told me it's just a matter of changing the names and nothing will screw up.

  5. #5
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    Yes, just open wp-config.php in your favorite text editor. Then update the database name, username, and password to reflect your current info. Just opening the file shouldn't have any effect on anything. It's editing it improperly that can mess things up. Just be careful while you're in there.

    Another option (though I haven't tested this extensively) would be to rename your wp-config.php file to something like wp-config.php.BAK. When you do this and refresh in your browser it should run through the initial setup again. Just enter your new info into the form (making sure you put in the database name of where your current WordPress stuff is) and everything should fix itself. But again, I haven't tested this extensively so just try editing the wp-config.php file before you try this option.

    Hope that helps.

  6. #6
    Join Date
    Aug 2008
    Posts
    204
    I already edit the wp-config.php file and it did nothing. Remember I had wordpress working perfectly anything done wrong could cause a reinstall which I don't want.

  7. #7
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    What did your wp-config.php file look like before you edited it and what does it look like now?

  8. #8
    Join Date
    Aug 2008
    Posts
    204
    All I had changed what the database name and database password and it didn't change nothing. As I currently stand wordpress still can't connect to the database. As I was informed it has to do with fixing something within MySQL

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles