coloma wrote:
etresoft, thanks for sharing this ... I decided to go with the TriangleJuice suggestion instead for two reasons ... first is that I wasn't sure where to find this launchd file.
There is nothing wrong with TriangleJuice's suggestion. My only issue with creating a php.ini file is that now I have to worry about all those other settings in the ini file. If something else in PHP breaks, I have to figure out if I am the one who broke it.
Apple ships MySQL with MacOS X Server. They probably adjusted the PHP settings to match how they have MySQL setup in MacOS X Server.
For MySQL's, no, Sun's - drat! no, Oracle's part, they still haven't acknowledged the fact that Apple has shipped MacOS X 10.4. MySQL still ships with a Startup Item. If you don't know where the launchd file is, it is because you don't have one. You probably have a MySQL entry in /Library/StartupItems or maybe /System/Library/StartupItems. Startup Items were deprecated in 10.4. Oracle should be creating a file named com.mysql.mysqld.plist in /Library/LaunchDaemons.
Here is what mine looks like now:
<?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</string>
<string>--socket=/var/mysql/mysql.sock</string>
<string>--basedir=/usr/local/mysql</string>
<string>--datadir=/usr/local/mysql/data</string>
<string>--user=mysql</string>
<string>--log-error=/usr/local/mysql/data/Pele.local.err</string>
<string>--pid-file=/usr/local/mysql/data/Pele.local.pid</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I also don't have a /var/mysql directory and wasn't sure whether I should just create one or if this meant my configuration was different. If you feel like explaining any of this, I'd be curious to know.
You have to create one. Such a directory probably already exists on MacOS X Server. Just make sure it is owned by mysql.
sudo mkdir /var/mysql
sudo chown _mysql:staff /var/mysql
sudo chmod 0755 /var/mysql
[jdaniel@Pele:516] /var $ ls -al /private/var | grep mysql
drwxr-xr-x 3 _mysql staff 102 Aug 26 20:03 mysql
Of course, /var is a symbolic link to /private/var. Long story there.