ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Changed DB Password + Config.php but Still Can't Display Site

December 21, 2008 11:46am

Subscribe [2]
  • #1 / Dec 21, 2008 11:46am

    Ceil

    65 posts

    Last night, I changed my MySQL database password on my account at my webhost’s site.

    Then I got the following error when I tried to visit my site or log into my control panel:

    Database Error: Unable to connect to your database. Your database appears to be turned off or the database connection settings in your config file are not correct. Please contact your hosting provider if the problem persists.

    I did all of the following:

    1) I downloaded my config.php file, updated the password in it, and reuploaded it.
    The line of text I altered in the config.sys file was this one:

    $conf['db_password'] = "[newpassword]";

    2) I went into all the cache folders under my system folder and deleted all the content in those.

    But the problem still persists. Is there something more I need to do to make this work?

    Best wishes,
    Ceil

  • #2 / Dec 21, 2008 12:19pm

    Kernon

    173 posts

    Ceil,

    I’m not with tech support, but you may have a dbtest.php file in your system/utilities folder, and you could try putting in your values and running it to what the specific error is.  Or, possibly you had a typo somewhere along the way with the new password.  You could try changing it again and updating to that password to see it that was the problem.

  • #3 / Dec 21, 2008 1:33pm

    Ceil

    65 posts

    I already put the new password in again, and I checked the config.php file for typos many times. So that’s not it. But thanks.

    As for your other idea, I see the dbtest.php, but I don’t know what I’m supposed to do with it/put in it after I download it. I don’t know what kind of values you are referring to, what exact code to put in there or where in the file to put it, and I don’t know what “running it” means.

    So that is out of my depth.

    If you can give me very specific instructions, I could try that. Otherwise, I’ll have to wait for tech support to come to my rescue.

  • #4 / Dec 21, 2008 1:46pm

    Ceil

    65 posts

    Okay, never mind! Call off the dogs! (Not that you are a dog, Kernon! Far from it, I’m sure!)

    I just tried one more thing; I removed the special character, $, from the password, setting a new one without it, then changed it in the config.php to that new one, and all is well.

    I don’t know much about MySQL or PHP. I guess the $ isn’t allowed for passwords, since it is used for other things in that code.

    Thanks for your help, though. I appreciate your trying to assist me on a Sunday before Christmas!

    Best wishes,
    Ceil
    P.S. It was my husband who figured this one out, and he isn’t even a programmer of web pages of any kind.

  • #5 / Dec 21, 2008 2:19pm

    Kernon

    173 posts

    Ceil,

    Glad you figured it out.

    I believe that if the password had been enclosed in single quotes instead of double quotes, you would have been OK.  Inside double quotes, PHP variables (which begin with a dollar sign!) are parsed, and that is what caused the problem.

    Kernon

  • #6 / Dec 21, 2008 3:35pm

    Greg Aker

    6022 posts

    Hey Ceil:

    I’m glad you got this worked out.  Please don’t hesitate to post again again should anything else come up!

    -greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases