Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrichmon

macrumors 6502a
Original poster
Jun 17, 2003
873
3
I've just updated my machines to 10.4.4 using software update. After the reboot I noticed that the MySQL server I have running did not restart. A quick poke at the system preferences showed that the MySQL preferences pane has is no longer visible.

I will poke at my system and post an update once I understand what is going on. But I wanted to post this warning quickly...
 

mrichmon

macrumors 6502a
Original poster
Jun 17, 2003
873
3
strydr said:
No problems here... iMac still has MySQL pref. and it still starts..

Ok, poking around a little more I've found that I still have the preferences pane and MySQL starts up fine. Poking around at the tables shows that the data still appears to be fine.

However, the installation of MediaWiki that I have running on top of MySQL isn't happy. The site is failing with the error: "(Can't contact the database server: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) (localhost)".

I can see a mysql.sock socket created in /tmp but I'm not sure which socket the wiki expects to use to connect to MySQL. I can see a /tmp/mysql.sock socket on the system and my /var directory has no mysql directory at all now. (I'm uncertain if there was one previously.)
 

mrichmon

macrumors 6502a
Original poster
Jun 17, 2003
873
3
Mitthrawnuruodo said:
Slightly off topic, but where did you get a MySQL install with a pref pane?

Download the MySQL installer from http://www.mysql.org the package installer only installs the database engine. But included in the disk image is a preference pane.
 

mrichmon

macrumors 6502a
Original poster
Jun 17, 2003
873
3
After poking around, it turned out that MySQL was running fine after the upgrade.

PHP however was unable to connect to the MySQL server on the localhost. It seems that the 10.4.4 update has installed a new version of php. The version of php installed under 10.4.3 was able to find the MySQL socket under the file /tmp/mysql.sock.

Under 10.4.3, my /etc/php.ini file included the line
Code:
mysql.default_socket =

After updating to 10.4.4 my installation of MediaWiki (implemented in php) failed to connect to the MySQL database until I changed the line in /etc/php.ini to read
Code:
mysql.default_socket = /tmp/mysql.sock
 

corwinderkatch

macrumors newbie
Jan 12, 2006
3
0
I had the same problem yesterday. I was getting a failed connection error (#2002) from mysql. It works fine using CocaoMySQL or MySQL Administrator, just nothing through a browser.

I believe they changed the default socket for PHP/MySQL to point to /var/mysql.sock. However, after the 10.4.4 upgrade PHP was pointing to /var/mysql.sock (even thought it didn't exist!).

I tried changing the mysql_socket directinve in php.ini, but no luck. Changing /etc/my.cnf to the following finally worked:

[mysqld]
socket = /tmp/mysql.sock

[client]
socket = /tmp/mysql.sock


I found these two articles helpful:
http://docs.info.apple.com/article.html?artnum=302977

and

http://docs.info.apple.com/article.html?artnum=302977

I am using MySQL 4.0.21 installed with help from http://www.entropy.ch, PHP 4.3.11 and running OS X 10.4.4 Dual 2.5 G5.

The second article says to remove all socket directives from my.cnf and use the defaults, but then MySQL/PHP simply doesn't work.
 

corwinderkatch

macrumors newbie
Jan 12, 2006
3
0
Not sure why but this works now too:

Make sure /etc/my.cnf is empty.

Change following line in /etc/php.ini:

mysql.default_socket = /tmp/mysql.sock
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.