Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

timokfine's avatar

Can't connect to local MySQL server through socket

I am using Laravel Valet and I’ve just received an error message while trying to connect to my databases through Sequel Pro. I’ve not had this happen before today.

Unable to connect via the socket, or the request timed out.

Double-check that the socket path is correct and that you have the 
necessary privileges, and that the server is running.

MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I’ve been trying to find an answer for the better part of an hour and I can’t find a solution. Worst timing too as I have a deadline on a project tomorrow morning.

Does anyone know what the issue could be? Any suggestions?

Thanks!

0 likes
2 replies
timokfine's avatar

@neilstee It’s unrelated to Laravel specifically. I cannot access MySQL at all—not via Sequel Pro and not via Terminal.

Side note: I cannot lose the data in one of my existing DBs. I saw one forum thread on StackOverflow that suggested completely uninstalling MySQL, but would I lose my DBs if I did so?

Please or to participate in this conversation.