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

前端 未结 7 1587
轻奢々
轻奢々 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 14:10

    Same problem here, but managed to resolve it connecting to IP:Port, not socket.

    'host' => '127.0.0.1', //use 172.0.0.1 instead of localhost
    'port' => '8889', //default MAMP MySQL devel port, default production port is 3306
    

    and forget about socket connection.

提交回复
热议问题