Greg Willits wrote:
On May 20, 2004, at 11:08 AM, Sasha Pachev wrote:

Greg Willits wrote:

I have two mysql apps running on the same machine (OS X 10.3.3). A mysql 3.23.54 on port 14551, and a mysql 4.0.16 on 3306. Each has a config file specifying the port and a unique socket name in /tmp. They have coexisted just peachy for a very long time.
Now however, w/o any changes to either MySQL3, MySQL4, or the OS, every time I issue a terminal command to one of the MySQL3 bin apps preceded by the usual cd /x/y/z/bin, the commands are being sent to the /usr/local/mysql bin apps on 3306. If I shut mysqld 3306 down (which closes the sock file), then any commands to mysql 14551 gripes that there is no socket file even though the one it should be using is still available.


Do not worry about why it stopped working - it was not supposed to anyway, and if it did, it was pure luck :-)


I was lucky for over two years across several machines then. I think that may be my best streak of anything ever. Too bad there was no money involved! ;-)

A clean way to solve the problem would be to create small shell scripts called mysql-3 and mysql-4 that will connect to the right instance.


I've started that process, though I'm not much of a shell scripter yet. So it's time to dig in or get used to specifying the socket I guess. OK. Well, at least I know.

Greg:

You do not need to be much of a shell scripter - it is just one line for each script:

put in /usr/local/bin/mysql-3:

------------start-----------
#! /bin/sh

mysql --socket=/tmp/mysql-3.sock
------------end---------------


put in /usr/local/bin/mysql-4:

--------------start----------
#! /bin/sh

mysql --socket=/tmp/mysql-4.sock
--------------end----------------

Make sure to exclude the ---- start/end marker lines when you paste, and fix the socket path if I guessed it wrong, if this is not obvious

Execute

chmod +x /usr/local/bin/mysql-3
chmod +x /usr/local/bin/mysql-4


Job done!

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to