When you get this error, make sure your web server is configured correctly and also, make sure MySQL runs smoothly and is connected to WordPress. Often, to fix this error you must check all the configurations in MySQL and web server and make sure everything is configured correctly.