Local Community

Solution: Error establishing a database connection

Hi just posting this as I have run into this problem twice on Linux (previously used Local on Mac without any issues) and after a search on here there was no clear cut answer, plus it seems like there are a lot of similar threads without any conclusion or replies.

In my case I went to the database tab of the project that was causing me problems and found the ‘Socket’ path

In this case - ~/.config/Local/run/oTFN3uFRX/mysql and there I deleted the file mysqld.sock.lock

After that I quit out and started up the WP installation in question and it worked fine. Hope this helps