MySQL 5 and MySQL 5.1 installed concurrently

Ryan Schmidt ryandesign at macports.org
Fri Feb 6 22:44:59 PST 2009


On Feb 6, 2009, at 22:44, Michael J. I. Jackson wrote:

> Is it possible to install the mysql5 and mysql5-devel ports  
> concurrently on the same box? I had 5.0 installed, but then decided  
> I'd like to try 5.1. So I deactivated the mysql port and installed  
> mysql-devel. However, it appears that the install location for 5.1  
> is exactly the same as 5 so the two cannot coexist on the same  
> machine.
>
> If someone would please confirm this, that would be great. If you  
> could tell me how to confirm it for myself so I don't have to  
> bother you next time, that would be even better. ;)

You can have both mysql5 and mysql5-devel installed at the same time,  
but not active at the same time. The same goes for any other foo/foo- 
devel port combination.

If you have mysql5 installed and would like to try mysql5-devel  
instead, you would need to

sudo port deactivate mysql5
sudo port install mysql5-devel +server

In this particular case (mysql5 5.0.x and mysql5-devel 5.1.x) you  
would also need to rebuild any programs (such as php5) that use the  
mysql library, because the version number of the library has changed.  
Otherwise you will find that php will complain about not being able  
to find the (old) mysql5 library. To rebuild php5:

sudo port -nf upgrade php5

Some ports may not know about mysql5-devel and still try to depend  
exclusively on mysql5. For example, if you've installed mysql5-devel  
as above, and then try to install a port that requires mysql5, you'll  
get an error as it tries to activate mysql5 but can't because mysql5- 
devel is already active. Usually this is a bug, which should be filed  
against that port so that the dependency can be rewritten so that  
either mysql5 or mysql5-devel can be used.




More information about the macports-users mailing list