Current time: 04-23-2014, 01:02 AM Hello There, Guest! (LoginRegister)

Post Reply 
Changing MySQL db User Password Causes Connection Error
09-19-2010, 08:03 AM
Post: #1
Changing MySQL db User Password Causes Connection Error
Hi,

I'm trying to change the user passwords for my MySQL databases in the Dreamhost webpanel (under "My MySQL Databases", selecting the user, and then entering the new password twice). However, for some reason, I'm unable to do so without causing an "Error establishing a database connection" when I visit the associated blogs and wiki online in a web-browser.

I have four dbs and two users:
  • user1 -- with access to all four dbs
  • user2 -- with access to only one

Changing the user password for "user2" does not impact the connection; changing it on "user1" means that I can't visit any of the Wordpress blogs or my Mediawiki wiki through the course of normal web-browsing.

I had believed that the password controlled direct access to the MySQL db; I'm surprised that it has an impact on the functionality of the software.

I'm having trouble finding out where I'm screwing up (other than just leaving the password alone) in the Dreamhost troubleshooting wiki. All I can find is:

  1. http://forum.dreamhosters.com/troubleshooting/7999-Change-password-for-mysql-user.htm
  2. http://wiki.dreamhost.com/MySQL


Neither of which seems to help.

I'd be very grateful is someone could tell me how to fix this -- but a link to the correct wiki page/ forum thread would also be appreciated. The password on User1 is pretty old by now and due for a change.

And, yes, this is all very embarrassing.

Cheers,

-- David

--
Blank Reg: "It's a book. It's a non-volatile storage medium. It's very rare. You should 'ave one." (Max Headroom, Episode 1.2)
Find all posts by this user
Quote this message in a reply
09-19-2010, 10:36 AM (This post was last modified: 09-19-2010 10:51 AM by sdayman.)
Post: #2
RE: Changing MySQL db User Password Causes Connection Error
You need to edit the wp-config.php file in your wordpress directory to use the same DB password you set.
The web panel you used sets the user password on the database server. Now you need to set the password on the client (website) end.

Your wiki should also have a config.php type file (or maybe it's that "localsettings" file) with the db username and password.

-Scott
Find all posts by this user
Quote this message in a reply
09-19-2010, 02:27 PM
Post: #3
RE: Changing MySQL db User Password Causes Connection Error
Brilliant. Thanks, Scott -- I'll give this a whirl, later tonight ...

Cheers,

-- David

--
Blank Reg: "It's a book. It's a non-volatile storage medium. It's very rare. You should 'ave one." (Max Headroom, Episode 1.2)
Find all posts by this user
Quote this message in a reply
10-19-2010, 05:14 PM
Post: #4
RE: Changing MySQL db User Password Causes Connection Error
(09-19-2010 02:27 PM)David Platt Wrote:  Brilliant. Thanks, Scott -- I'll give this a whirl, later tonight ...

And, by "tonight", I apparently meant one month later. Seems to have done the trick, with only a few anxious minutes as I waited for the changes to take effect.

Thanks again! :-)

Cheers,

-- David

--
Blank Reg: "It's a book. It's a non-volatile storage medium. It's very rare. You should 'ave one." (Max Headroom, Episode 1.2)
Find all posts by this user
Quote this message in a reply
04-06-2012, 08:22 PM
Post: #5
RE: Changing MySQL db User Password Causes Connection Error
I did the same thing, however, I am at a disadvantage because I know near nothing about editing php files. Could you please let me know the best way to go about this.
Find all posts by this user
Quote this message in a reply
04-07-2012, 07:37 AM
Post: #6
RE: Changing MySQL db User Password Causes Connection Error
(04-06-2012 08:22 PM)Snagle2oth Wrote:  I did the same thing, however, I am at a disadvantage because I know near nothing about editing php files. Could you please let me know the best way to go about this.

Just open the file in any text editor. Are you on Windows? Notepad is preferred…

You want to look for the MySQL settings. They look like this:

Code:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'DB name goes here');

/** MySQL database username */
define('DB_USER', 'Username goes here');

/** MySQL database password */
define('DB_PASSWORD', 'Password goes here');;

Put your info inside the singe quotes. While you're at it, you can also change the salts by going to the generator and pasting them here:

Code:
define('AUTH_KEY',         't`DK%X:>xy|e-Z(BXb/f(Ur`8#~UzUQG-^_Cs_GHs5U-&Wb?pgn^p8(2@}IcnCa|');
define('SECURE_AUTH_KEY',  'D&ovlU#|CvJ##uNq}bel+^MFtT&.b9{UvR]g%ixsXhGlRJ7q!h}XWdEC[BOKXssj');
define('LOGGED_IN_KEY',    'MGKi8Br(&{H*~&0s;{k0<S(O:+f#WM+q|npJ-+P;RDKT:~jrmgj#/-,[hOBk!ry^');
define('NONCE_KEY',        'FIsAsXJKL5ZlQo)iD-pt??eUbdc{_Cn<4!d~yqz))&B D?AwK%)+)F2aNwI|siOe');
define('AUTH_SALT',        '7T-!^i!0,w)L#JK@pc2{8XE[DenYI^BVf{L:jvF,hf}zBf883td6D;Vcy8,S)-&G');
define('SECURE_AUTH_SALT', 'I6`V|mDZq21-J|ihb u^q0F }F_NUcy`l,=obGtq*p#Ybe4a31R,r=|n#=]@]c #');
define('LOGGED_IN_SALT',   'w<$4c$Hmd%/*]`Oom>(hdXW|0M=X={we6;Mpvtg+V.o<$|#_}qG(GaVDEsn,~*4i');
define('NONCE_SALT',       'a|#h{c5|P &xWs4IZ20c2&%4!c(/uG}W:mAvy<I44`jAbup]t=]V<`}.py(wTP%%');

(DO NOT use the above salts!!)
It's always a good idea to update all of Wordpress' security measures once in a while. Changing the salts will log you out if you are logged in to the WP dashboard.

More info is available here and here.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-07-2012, 09:34 AM (This post was last modified: 04-07-2012 09:51 AM by Snagle2oth.)
Post: #7
RE: Changing MySQL db User Password Causes Connection Error
mattesque

Thanks for the reply. I'd like to take a step back though. Opening the files is my problem. I'm sure this is simple, it is somewhat frustrating for me. I cannot edit the files through dreamhost...I can see the files but I cannot edit them. I have attempted to gain access to them using FileZilla and all attempts at this have failed too. Can you give me a bare bones tutorial on how to gain access to these files?

Greatly appreciated.




Update...I got into filezilla.


done and done. Thanks so much.
Find all posts by this user
Quote this message in a reply
04-08-2012, 01:27 PM
Post: #8
RE: Changing MySQL db User Password Causes Connection Error
Sorry – I missed your reply.
Glad you got it done though!
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: