> I have successfully configured mysqld_multi to have mysql 4.1.11 and > 5.0.3 beta running on the same machine: > I would like to see how you configured mysqld_multi to do that, if you could send me the information off list I'd appreciate it.
> # mysqld_multi start & > # exit > % mysqld_multi report > Reporting MySQL servers > MySQL server from group: mysqld4 is running > MySQL server from group: mysqld5 is running > % > > However, I can't get this to work at system startup time. Starting up > a single mysql server works fine, with the following > /Library/StartupItems/MySQL/MySQL script: > > #!/bin/sh > > . /etc/rc.common > > if [ "${MYSQL:=-YES-}" = "-YES-" ]; then > > ConsoleMessage "Starting MySQL database server" > /usr/local/mysql/bin/mysqld_safe & > fi > > But if I change " /usr/local/mysql/bin/mysqld_safe &" to " > /usr/local/mysql/bin/mysqld_multi start &", no servers start up. There > are also no error messages in the .err logs: the last item there is > the previous 'normal shutdown'. > > Any ideas? I would think that there should be no difference between > executing mysqld_multi from a root shell and executing it at startup > time, but apparently it's not the same. > You need to be careful... There isn't a difference between running mysqld_multi at the command line and running it inside a script - remember what you are running at startup isn't mysqld_multi but rather this command: /System/Library/StartupItems/MySQL/MySQL start That script then calls mysqld_multi, or not, depending on some variables in the script... What happens when you run /System/Library/StartupItems/MySQL/MySQL start At the command prompt... I venture a guess that the results are still no mysqls start. Let me share my startup script with you... #!/bin/sh . /etc/rc.common StartService () { if [ "${MYSQL=-NO-}" = "-YES-" ]; then ConsoleMessage "Starting MySQL" /usr/local/mysql/bin/mysqld_multi start fi } StopService () { /usr/bin/mysqladmin ping >/dev/null 2>&1 if [ $? -eq 0 ]; then ConsoleMessage "Stopping MySQL" /usr/local/mysql/bin/mysqladmin --socket=/tmp/mysql.sock shutdown /usr/local/mysql/bin/mysqladmin --socket=/tmp/mysql2.sock shutdown else ConsoleMessage "MySQL is not running" fi } RestartService () { StopService StartService } RunService "$1" There are some minor differences in how mine (which is working) and yours seem to be configured... Let's look at those... What version of OS X are you working on? Mine is running on 10.3.8, has been running on the previous versions of 10.3 also. The major difference I see is the test on if to start or not... This will be important. You have: if [ "${MYSQL:=-YES-}" = "-YES-" ]; then While I have: if [ "${MYSQL=-NO-}" = "-YES-" ]; then I don't know why yours is different, I know that mine works, it is Apple's script and test, I just changed the binary it executes. The other factor here is /etc/hostconfig - it must have a line that looks like this: MYSQL=-YES- If YES is actually NO or if the line is not present at all, the startup script will not execute the script. Actually /etc/hostconfig is what the Startup scripts use to tell it what to start or not, if you want to bounce your server and not have mysql start when it reboots you can edit /etc/hostconfig and set the YES to a NO for the MYSQL=-YES- line, just be sure to change it back when you are done. When all is said and done you don't need to restart the whole machine to see if your script is working.. You can simply run: /System/Library/StartupItems/MySQL/MySQL start And you will find out if you are working. I also have some changes in the shutdown part of the script, because I use mysqld_multi to start it, the original use of mysqladmin to shutdown the single instance isn't going to shutdown both instances... So I add a line for each instance to call "mysqladmin shutdown" and point it to each socket file that is configured in the my.cnf file for each instance. Hope that helps. Best Regards, Bruce -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]