port = socket

By pikemon

I’m just in the middle of my very first CakePHP implementation. I was trying to figure out how to pass the socket to the CakePHP because I’m running MAMP and the MySQL socket is a somewhat non-standard ‘/Applications/MAMP/tmp/mysql/mysql.sock’.

Turns out that PHP’s mysql_connect function accepts either a socket or a port interchangeably.

So I used this in my CakePHP database configuration file:

‘port’ => ‘/Applications/MAMP/tmp/mysql/mysql.sock’

CakePHP is a Ruby On Rails clone written in PHP. This far it’s promising, but naturally it has PHP in it which I happen to dislike.

Tags:

Leave a Reply