24 Feb How to recover a Magento site after loosing the encryption key
Every time you finish installing Magento, it displays the encryption key. And are responsible to save it somewhere.
If you delete local.xml, the encryption key will be lost and you won’t be able to connect to the database again.
But there is a tedious way to fix it and get a new encryption key.
Export the database you are using, then you need to prepare a new installation of Magento, but don’t run it yet. Import the database that you just exported to a new database, create an user to access it (preferably the same one you already have) and run the installation again. This time, note down the encryption key.
Once this second site is up and running, export the database one more time. Import the database to the server of your 1st site, the one who is broken.
Go to app/etc/local.xml and edit the file to insert the new encryption key and to point to the new database.