PHP and PDO on the command line with MAMP
I’ve been working with a couple of command line tasks over the last couple of days using PDO MySQL connections and ran across a problem where PHP on the command line could not connect to MySQL’s default socket. It’s a busy discussion on Google and there seem to be a lot of garbled listings when you google this so here’s my 2 quid.



