PDO connection error when using symfony and MAMP

前端 未结 4 2104
耶瑟儿~
耶瑟儿~ 2021-02-14 05:18

Getting an PDO error when trying to do php symfony doctrine:insert-sql
The error I get:

Warning: PDO::__construct(): [2002] Connection refused         


        
4条回答
  •  离开以前
    2021-02-14 06:06

    MAMP PRO 2.x
    I was able to solve this and many similar issues by simply unchecking "Allow local access only" in the MySQL prefs on the MAMP control panel.

    enter image description here

    MAMP PRO 3.x
    As stated by Kendrick: enter image description here

提交回复
热议问题