Skip to content

FreeBSD MySQL – ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

Is this a new MySQL install? You need to make sure to copy an example configuration file from

/usr/local/share/mysql/

(they’re called my-small.cnf, my-medium.cnf, etc.)

The file needs to be copied to the /usr/local/etc/ directory. Make sure to read through it and update any pertinent lines!

Happy coding!

Published inDevelopment

Be First to Comment

Leave a Reply