I installed mysql via homebrew. I ran the two commands brew suggests:
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
When I tried to run the mysql_secure_installation script, I receive this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
A separate thread led me to believe it had to do with permissions: connect to local MySQL server through socket
I ran the suggested commands substituting their mysql directory with
/usr/local/var/mysql
Yet, the problem persists. Help!