MySQL Forums
Forum List  »  NDB clusters

Here's my fix... Error 2002 after Mac OSX Security Update
Posted by: Jay Stolpestad
Date: March 28, 2006 10:02PM

An associate found this regarding the OSX security update that was released about a
month ago. It got me back up and running again.

Try the suggestions that are mentioned below.

* The default socket location for PHP and MySQL is now the same
(/var/mysql/mysql.sock). If you modified your MySQL configuration to
revert to using /tmp/mysql.sock, the update process will detect that
condition and create a symlink in /var/mysql so that the socket can be
accessed by PHP. This is done to prevent disruption, and should be
considered a temporary measure. At your earliest convenience, you should
remove any socket directives from the [mysqld] and [client] sections of
your MySQL config files, and allow MySQL to use its default socket
location. Then you can restart MySQL; it will remove the symlink from
/var/mysql, replace it with the socket, and PHP will continue to have
access.

In addition, to remove a barrier to seamless interaction with the Apache
web server:

* The MySQL Manager application now creates the /var/mysql directory
(which contains the MySQL socket) with permissions that allow the web
server to access it.
* If that directory already exists, the update process sets the
correct permissions.

For self-installed MySQL

If you have downloaded and installed MySQL yourself but are using the
pre-installed version of PHP, note that your custom version of MySQL
might be configured to use the old MySQL socket location,
/tmp/mysql.sock. The version of PHP in this software update uses the
newer location /var/mysql/mysql.sock by default.

Therefore, if your PHP scripts are failing to connect to your custom
installation of MySQL, this is a likely cause. To correct this, you can
modify the PHP configuration file to use the old MySQL socket location:

1. Create /etc/php.ini if it is not present. (You can do so by
copying /etc/php.ini.default to /etc/php.ini).
2. Edit the /etc/phi.ini config file, find the [MySQL] section, and
change this line:

mysql.default_socket = /var/mysql/mysql.sock

To:

mysql.default_socket = /tmp/mysql.sock

3. Restart the web server to pick up the new PHP settings. It should
not be necessary to restart MySQL.



Edited 1 time(s). Last edit at 03/28/2006 10:02PM by Jay Stolpestad.

Options: ReplyQuote


Subject
Views
Written By
Posted
4593
February 28, 2006 08:10AM
Here's my fix... Error 2002 after Mac OSX Security Update
11147
March 28, 2006 10:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.