I'm using apache version that comes with OS X. So every update is a pain (El Capitan).
After setting up php and apache configurations, my application responded with something like General error: 1017 Can't find file. At first i thought it was some php dependency I'm missing but it turns out it is mysql database directory which doesn't have permissions to write. I was testing mysql with simple select query from MySQLWorkbench.
First I had to find what is data dir of mysql.
Start mysql client:
mysql -u <username> -p
And type
mysql> select @@datadir;
In my case it was: /usr/local/mysql/data/ so go to that dir cd /usr/local/mysql/data/
and then change permissions to chmod -R 755 .
and that was it.
Note: I start mysql server through command line as a main user, maybe you need to change own of the folder.