$ sudo port install php5-mysql Password: ---> Computing dependencies for php5-mysql ---> Fetching php5-mysql ---> Verifying checksum(s) for php5-mysql ---> Extracting php5-mysql ---> Configuring php5-mysql ---> Building php5-mysql ---> Staging php5-mysql into destroot ---> Installing php5-mysql @5.3.0_0+mysqlnd To use mysqlnd with a local MySQL server, edit /opt/local/etc/php5/php.ini and set mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket to /opt/local/var/run/mysql5/mysqld.sock ---> Activating php5-mysql @5.3.0_0+mysqlnd ---> Cleaning php5-mysql
表示されているメッセージにあるように、php.iniにdefault_socketを設定するのを忘れないこと。
To use mysqlnd with a local MySQL server, edit /opt/local/etc/php5/php.ini and set mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket to /opt/local/var/run/mysql5/mysqld.sock