OSX + PDO_MYSQL + Yii Working solution.

Getting PDO_MYSQL running in PHP on OSX has been a nightmare. I tried about half a dozen suggestions on other forums with no luck. Often, everything looked good, but wasn't actually working.

Anyone else with a similar problem, I suggest you try this: http://drewish.com/node/110.

It means reinstalling everything, but its still faster than troubleshooting a bunch of broken driver installs. All told, it took me about 1.5 hours, and I can now run Yii with MySQL.

Notes that might help some:

  1. Should go without saying, but backup your stuff before you start

  2. After installing wget et. al. via macports, make sure your path is updated (mentioned in the comments)

  3. When creating the Databases after the MySQL install, if you error out, retry with "–user=root" instead of "–user=mysql" (also in the comments).

I struggles myself and finally ended up installing MAMP.  It  works great.

R

I can't believe how complex the various user guides/blog postings on how to configure this are.

I just followed this guide to compile the pdo extension into the stock php yesterday:

http://akrabat.com/2…n-os-x-leopard/

Took about 10 minutes to install and fix mysql, download php and the compile, and read the php error log to fix a mysql issue. Just read the comments if you have any issues.