Magento – Password Cache Error

Nothing is more annoying than visiting your Magento website and discovering an error on the homepage instead of your beautiful content.  In this article, we will discuss a common error with the password cache and how to fix it.

There has been an error processing your request

SQLSTATE[28000] [1045] Access denied for user ‘username’@’’ (using password: YES)

Does this look familiar?  I know.. I know.. you setup a clean install of Magento and then you went back the next day and your homepage has been replaced with this ugly error.   So, what is it, why did it happen, and how do you get rid of it you may ask.  See below.

What is it?

Your website is telling you that access was denied for a specific account.  If you scroll down and review the error in detail, you will quickly realize that the user logging in was the coming from the same IP as the Magento site.  This means that it was Magento trying to access its own database and the login credentials didn’t work.

Why did it happen?

This error happens when the password has changed for the database and the cache was not cleared.  A conflict occurs.  The most common situation is when you have setup the site and then go in and change the database password after the setup is complete.

How do I get rid of it?

Step 1:

edit   /app/etc/local.xml change the password to match your database password

Step 2:

erase the file    /app/etc/use_cache.ser


As with each Magento error fix, make sure that you login to your Magento Admin panel after the fix has occurred and delete your cache.  Refresh your site and make sure that the fix worked for you.