mac下 mysql / nginx 问题总汇

"ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

解决1

mysqld stop

mysql.server start

解决2

https://ruby-china.org/topics/794

nginx 启动不了 nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)

sudo nginx -c /usr/local/conf/nginx.conf

sudo nginx -t 可以查看载入了哪个配置文件,上面这个错误是因为真正的配置在/usr/local/etc/nginx/conf.d下,里面的配置文件写错了,昨天花了挺多时间找错误,今天总算水落石出。

原文地址:https://www.cnblogs.com/coolicer/p/4594878.html