Upgrade to Tiger, PHP and MySQL broken
I quickly noticed after upgrading to OS X 10.4 that PHP includes were not executing and MySQL queries were once again producing the dreaded 'cannot connect' error message which
10.3.9 had introduced:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Fixing the broken PHP was easy. I simply installed
Mark Liyange's PHP 5.0.4 package. Tiger
ships with 4.3.10.
For the MySQL error, for reasons I have not yet looked into the
previous solution (repairing the ownership of the
/usr/local/mysql/data folder) did not fix the problem. And trying to load
mysqld in the Terminal showed that it not have permission to access the
/usr/local/mysql/data folder. Since changing its ownership to the 'mysql' user did not help, I tried changing to it my user account instead (in my case the command was
sudo chown -R thoughton data/.) Bingo, that did the trick! Everything works again.
A word of caution, this is just a quick fix while learning the ins and outs of Tiger, I wouldn't be surprised if doing this has opened up some huge security hole - so do it at your own risk and always keep a backup.
Posted on 27 April 2005, to
How To... |
Mac OS X |
Site News
Comments
Hi,
I'm was having the same problem with MySQL.
The following commands seems to have dome the trick.
cd /usr/local/mysql
chown -R mysql data/
The startup item needs to be updated to be Mac OS X Tiger suitable:
This is what running the SystemStarter with flags -v -d to get verbose and debug info give:
SystemStarter[22136]: Checking MySQL 4.0.24-standard
SystemStarter[22136]: No antecedents
SystemStarter[22136]: Soft dependancies: {type = fixed-mutable, count = 0, capacity = 2, values = (
)}
SystemStarter[22136]: Best pick so far, based on failed dependancies (2147483647->0)
SystemStarter[22136]: Running command (22137): /Library/StartupItems/MySQL/MySQL start
SystemStarter[22136]: IPC message = {type = mutable, count = 3, capacity = 17, pairs = (
5 : {contents = "ProcessID"} = {value = +22137, type = kCFNumberSInt64Type}
11 : {contents = "ConsoleMessage"} = {contents = "Starting MySQL database server"}
18 : {contents = "Message"} = {contents = "ConsoleMessage"}
)}
SystemStarter[22136]: Starting MySQL database server
SystemStarter[22136]: Finished MySQL 4.0.24-standard (22137)
SystemStarter[22136]: none left
Hi,
I'm was having the same problem with MySQL.
The following commands seems to have dome the trick.
cd /usr/local/mysql
chown -R mysql data/
The startup item needs to be updated to be Mac OS X Tiger suitable:
This is what running the SystemStarter with flags -v -d to get verbose and debug info give:
SystemStarter[22136]: Checking MySQL 4.0.24-standard
SystemStarter[22136]: No antecedents
SystemStarter[22136]: Soft dependancies: {type = fixed-mutable, count = 0, capacity = 2, values = (
)}
SystemStarter[22136]: Best pick so far, based on failed dependancies (2147483647->0)
SystemStarter[22136]: Running command (22137): /Library/StartupItems/MySQL/MySQL start
SystemStarter[22136]: IPC message = {type = mutable, count = 3, capacity = 17, pairs = (
5 : {contents = "ProcessID"} = {value = +22137, type = kCFNumberSInt64Type}
11 : {contents = "ConsoleMessage"} = {contents = "Starting MySQL database server"}
18 : {contents = "Message"} = {contents = "ConsoleMessage"}
)}
SystemStarter[22136]: Starting MySQL database server
SystemStarter[22136]: Finished MySQL 4.0.24-standard (22137)
SystemStarter[22136]: none left