PHP5 and MySQL 5 on Leopard
A few quick notes about building MySQL 5.x and getting it working under Leopard:
- Follow Dan Benjamin’s excellent MySQL on Leopard tutorial.
- Copy the PHP configuration example to the actual expected location: sudo cp /etc/php.ini.default /etc/php.ini
- Edit it, and add /private/tmp/mysql.sock to both mysql.default_socket and mysqli.default_socket.
- Save, and restart Apache: sudo apachectl graceful
Once completed, the default PHP5 setup that comes with Mac OS X 10.5.x will be able to communicate with the MySQL version built using the above linked tutorial. Time to get developing!
December 10th, 2007 at 6:02 pm
For anyone who might want to compile PHP by himself, on Tiger or Leopard, I detailed how I was able to on my website:
http://www.pommepause.com/online/compile_php5_mac.html
December 14th, 2007 at 6:06 pm
Thanks for that, brand new mac owner after years of Windows/ Unix development and I was going nuts trying to figure out why it wasn’t using the standard mysql socket.
March 18th, 2008 at 3:17 am
@Guillaume Boudreau
You say “For anyone who might want to compile PHP by himself, on Tiger or Leopard, I detailed how I was able to on my website:” but then your web site CLEARLY says “Note that the following will only work on Tiger, not on Panther nor Leopard!”
Were you being intentionally deceiving with your post?