MySQL error installing Drupal

Ryan Schmidt ryandesign at
Wed Jan 13 12:33:54 PST 2010

On Jan 13, 2010, at 14:00, Jasper Frumau wrote:

> Here is my PHP Ini output: .

So you're not using MacPorts PHP at all; I think you're using Apple's PHP. Either one can work, but the default for Apple's PHP seems to be to look for mysql.sock in /tmp. So if you had formerly been using MacPorts PHP and are now using Apple PHP, that would explain why you were formerly able to use MySQL from PHP without setting the socket and now you can't.

> MySQL socket and MySQLi socket are not set it seems, which is odd.  PDO_MySQL is set, but not correct it seems. So I guess I need to add /opt/local/var/run/mysql5/mysqld.sock in these three places I guess?

It's not terribly odd that the mysql and mysqli socket aren't set; they aren't set by default. You should the default socket for mysql, mysqli and pdo_mysql to /opt/local/var/run/mysql5/mysqld.sock in php.ini so you can use any kind of connection to the MacPorts MySQL server from any kind of PHP.

More information about the macports-users mailing list