error establishing a database connection 3

I too had faced the same issue many times but after refreshing the browser it solved my problem. Kindly check the wp-config file and verify if the database name and other information is correct. Another thing you can try is restarting your local host.

Posts, pages and some images are deleted sometimes

Perhaps your site keeps getting hacked, if the posts and pages are in the trash every now and then? Have your tried changing the passwords for every user, database password, ftp credentials, WP salts and such? You could try installing WP Security Audit Log plugin (not affiliated) from the WordPress plugin repo for tracking all … Read more