Database connection “Mysql” is missing and mysql.sock is missing

前端 未结 7 1680
轻奢々
轻奢々 2021-01-12 13:46

I was trying to generate model code from cake command line tool. But got this issue.

Warning Error: PDO::__construct(): [2002] No such file or directory (try         


        
7条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 13:56

    MAMP is strange when it comes to mysql. Chances are you need to set up a symbolic link so it knows where to find it. Something like:

    sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock

提交回复
热议问题