Re: Possible to have both MySQL4 and MySQL5 on same machine?

Ryan Schmidt <[email protected]> Fri, 25 Aug 2006 17:48:36 +0200
Newsgroups gmane.os.opendarwin.darwinports
Message-ID <[email protected]>
On Aug 7, 2006, at 17:59, Tanc wrote:

>>> Just wondering if anyone has had any success running an instance  
>>> of MySQL4 and an instance of MySQL5 on the same machine (with  
>>> different data directories)?
>>
>> I suppose you would have to configure one (or both) of them to not  
>> use the network. Otherwise both would try to use the same port.  
>> But there is a config option you can use to disable network access  
>> entirely, which is great if you're just using it for testing with  
>> say PHP on the same machine.
>
> Thanks Ryan, but even just installing it gave errors due to mysqld  
> in /opt/local/libexec being overwritten. I don't know whether the  
> daemon is the same for both versions of MySQL. After using the -f  
> switch and installing it I created the config and pointed the MySQL  
> instance at the correct daemon and I also configured it to use a  
> different port. When starting the server it seems to choke on  
> creating or finding the pid file. I've specified a location for the  
> MySQL5 instance of the pid and it manages to delete the file but  
> not create a new one so it times out on this section and fails to  
> start the server.

I had assumed that you could install mysql4 and mysql5 at the same  
time. Otherwise I wouldn't know what the purpose was of putting all  
the mysql5 stuff in a mysql5 directory, for instance. But you seem to  
be right that both put their daemons in /opt/local/libexec which is a  
problem.

I found this bug report which is probably relevant:

http://bugzilla.opendarwin.org/show_bug.cgi?id=4115