Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MySQL 4 to 5 for PHP

I've just installed MySQL 5.0.27 on my Tiger server. As far as I can tell, it installed OK. MySQL 4.1.13 is still running on the server also (as was pre-installed). How do I link PHP to use the MySQL 5 instead of 4? Also, same question for MySQL Admin and through Terminal.

Thanks in advance.

G4, Mac OS X (10.4.8)

Posted on Nov 29, 2006 3:08 PM

Reply
Question marked as Best reply

Posted on Nov 30, 2006 9:30 AM

The stock Tiger server configuration expects to find the MySQL 'socket' at /var/mysql/mysql.sock. You can check this in /etc/my.cnf, and you can check where php will look for the MySQL socket in /etc/php.ini.

So, if your MySQL 5.x installer uses the same socket location (check the config file metnioned above), you should be all set.

Probably be a good idea to disable MySQL 4.x, by changing 'MYSQL=-YES-' to 'MYSQL=-NO-' in /etc/hostconfig. Note that this assumes that both MySQL 4 and 5 are running, which would indicate that the 5.x is using launchd, not SystemStarter to start at boot time, which is probably the case unless you really did a lot of tweaking.

I've just installed MySQL 5.0.27 on my Tiger server.
As far as I can tell, it installed OK. MySQL 4.1.13
is still running on the server also (as was
pre-installed). How do I link PHP to use the MySQL 5
instead of 4? Also, same question for MySQL Admin and
through Terminal.

Thanks in advance.




MacBook Pro Mac OS X (10.4.8)
5 replies
Question marked as Best reply

Nov 30, 2006 9:30 AM in response to mindpalette

The stock Tiger server configuration expects to find the MySQL 'socket' at /var/mysql/mysql.sock. You can check this in /etc/my.cnf, and you can check where php will look for the MySQL socket in /etc/php.ini.

So, if your MySQL 5.x installer uses the same socket location (check the config file metnioned above), you should be all set.

Probably be a good idea to disable MySQL 4.x, by changing 'MYSQL=-YES-' to 'MYSQL=-NO-' in /etc/hostconfig. Note that this assumes that both MySQL 4 and 5 are running, which would indicate that the 5.x is using launchd, not SystemStarter to start at boot time, which is probably the case unless you really did a lot of tweaking.

I've just installed MySQL 5.0.27 on my Tiger server.
As far as I can tell, it installed OK. MySQL 4.1.13
is still running on the server also (as was
pre-installed). How do I link PHP to use the MySQL 5
instead of 4? Also, same question for MySQL Admin and
through Terminal.

Thanks in advance.




MacBook Pro Mac OS X (10.4.8)

Nov 30, 2006 12:49 PM in response to Dave Walcott

Thanks Dave,

I guess my problem at this point is I don't know where the socket is for MySQL 5 to point everything to (apparently /var/mysql/mysql.sock is pointing to MySQL 4). Nothing in the /tmp folder.

I just used the standard installer from mysql.com for Max 5.0.27, Mac OS X 10.4 (PowerPC, 32-bit). I can see it installed MySQL 5 into /usr/local, but I don't know where the socket is...

MySQL 4 to 5 for PHP

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.