Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

PHP/MySQL issue after security update 2010-005

Hello,

I run Apache/PHP/MySQL on my MBP for testing Web sites.
After the 2010-005 security update I can't connect to my databases anymore.

I don't know how to fix this, I even don't know where to start looking.

Ideas, anyone?

Posted on Aug 25, 2010 7:13 AM

Reply
19 replies

Sep 3, 2010 2:25 AM in response to RobBT

@everyone, glad I could help. It was the error log that helped me finding this solution.

As for the solution that etresoft suggested: I guess if you like defaults, then you should go for this one. However, I don't think there's any harm in having a php.ini file 🙂

BUT: I read somewhere that having your MySQL socket in the "tmp" directory could be a security problem. I'm not a security expert, so I leave it to you which one of the suggested solutions you use.

Sep 7, 2010 10:28 AM in response to RobBT

I am going to have to retract one of my earlier suggestions. It turns out that you do need a MySQL config file to use the non-default socket path in /var/mysql. My hacked up launchd plist file sets the proper path in the MySQL server, but client libraries such as PHP, Perl, and mysql still can't find the server. The client socket path is still in /tmp. So, my new launchd plist file looks like:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld_safe</string>
<string>--user=mysql</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>


and I have a brand-new /etc/my.cnf file that has only:

[client]
socket=/var/mysql/mysql.sock
[mysqld]
socket=/var/mysql/mysql.sock


Unfortunately, that still wasn't enough. The Perl DBD apparently has the /tmp path hard-coded. I had to add ":mysql_socket=/var/mysql/mysql.sock" to my connection string. Now I have it running with some very funky PHP and Perl code.

PHP/MySQL issue after security update 2010-005

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.