When I imported production database and configured code on my local dev machine, I got this error even I had updated wp-config.php with correct information. I fixed the problem after some changes. This article explains troubleshooting steps to fix this error.
If you are a web developer or .Net blogger, you may want to run Apache and IIS on your dev machine. There are two ways to do this:
1. Keep IIS as it is and update XAMPP for different port
2. Keep XAMPP as it is and update IIS for different port
Let us see how to implement each case step by step.
For a wordpress blogger, it is required to setup and sync blog on local machine for theme, widget and plugin development and customization. this article shows the steps to setup wordpress blog on local machine from production server.