Forum Moderators: open

Message Too Old, No Replies

mySQL password change question

Does a change of the root password affect WordPress?

         

WebWalla

8:13 pm on Jul 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



WordPress is correctly installed and working.

However, I now want to change the root password for mySQL.

Will the password change affect the already installed WordPress? Do I have to specify the new password in a config file somewhere?

Thanks!

BradleyT

5:43 pm on Jul 27, 2009 (gmt 0)

10+ Year Member



If wordpress is using root to access MySQL then yes it will affect it. Personally I wouldn't use root for Wordpress or any other web apps. Just create a new user.

It's in wp-config.php which is in the root WP directory and the lines looks like this -
/** MySQL database username */
define('DB_USER', 'user0739101555771');
/** MySQL database password */
define('DB_PASSWORD', '2!U^py9');

not my real credentials

ergophobe

5:02 pm on Jul 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



And by the way, I would not use the root password to run WP.

Assuming that I will eventually end up with multiple databases on any account, I usually structure it like this

site: example.com
DB: examDB
user: examuser

examuser only has permissions on examDB which, normally, only has one user. That way if something bad were to happen and, let's say, my server had a glitch and started serving PHP as plain text and someone asked for wp-config.php, they wouldn't have root access on my DB.