OS X 10.4 PHP MySQL problem
To change the location where MySQL creates its socket file, do this:
1. Open your preferred text editor and create a plain text file.
2. Type this text (on two lines as shown):
[mysqld]
socket=/tmp/mysql.sock
3. Save the file as: /etc/my.cnf
To change the location where PHP looks for the socket file, follow these steps:
1. In Terminal: sudo cp /etc/php.ini.default /etc/php.ini
2. Open /etc/php.ini in your preferred text editor.
3. Find the [MySQL] section, and change the mysql.default_socket directive:
4. ; Default socket name for local MySQL connects. If empty, uses
5. the built-in
6. ; MySQL defaults.
7. mysql.default_socket = /var/mysql/mysql.sock
8. Change the permissions on /var/mysql so that www can read the socket, by executing this in Terminal:
sudo chmod 775 /var/mysql
×