1. Open up php.ini (mine was in /private/etc/)
  2. locate this line: pdo_mysql.default_socket=/var/mysql/mysql.sock
  3. Change the line to: pdo_mysql.default_socket=/tmp/mysql.sock
  4. Restart apache

启程
2.9k 声望479 粉丝

PHP是最好的语言