0

In the past I had installed MySQL as part of XAMPP in /Applications/XAMPP/ and the PHP that the system used (e.g. from command line) used /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock to connect with MySQL.

Now I have installed MySQL 5 with macports and I want my system PHP to be able to use that. I think I must set PHP to use /opt/local/var/run/mysql5/mysqld.sock but where do I set this? Is there a php.ini for CLI PHP?

Pylsa
  • 31,383
Mark P.
  • 41
  • 2

1 Answers1

0

There should be a php-cli.ini in /opt/local/etc/ (or where-ever PHP is installed). It should be in the same folder as your normal php.ini is in. If it's not, copy php.ini-dist or php.ini (which should also be in the same folder) to php-cli.ini.

Pylsa
  • 31,383