MySQL localhost / 127.0.0.1 problem

后端 未结 4 468
渐次进展
渐次进展 2020-12-11 23:35

I have a local web server running on my macbook and I\'ve come across a strange problem. I can access MySQL just fine using a program like Sequel Pro, password works and li

4条回答
  •  星月不相逢
    2020-12-12 00:18

    This is what fixed it for me. PHP.INI defaults to a different location than MySQL for the default socket. To fix, just run these two commands to add an alias (no restart needed):

    mkdir /var/mysql
    ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    

    Source

提交回复
热议问题