Friday, January 28, 2011

Change of mysql db password brings down website

Hello,

Each time I change the MySQL db password, and update the dbconfig file, the website is down.

I also flush privileges

Any idea why?

  • Given the sparsity of information provided, I'm guessing between changing the password in the database server and the config on the file system, the web server application is being hit by clients and for that period, the password being incorrect, the application cannot render the content without a database connection.

    I'd recommend first changing the db password via your tool of choice, then update the file and flush the db privileges as close to simultaneously as possible.

    Of course, this begs the question why you are changing the password so frequently that it is an issue, but I'll leave that to others to find out why. :)

  • What type of web application framework are you currently using? Depending on the framework, you may need to restart your web server to bring in the new changes to your database configuration within your application. You may want to try this procedure:

    • Change the password for your MySQL user
    • Run FLUSH PRIVILEGES; in MySQL
    • Restart your web application

0 comments:

Post a Comment