Forbidden localhost error and error establishing database

Try restarting the services.

If you still get the error of Error establishing a database connection, open wp-config.php and check if you have entered the proper database details (username, password, database name, host)