On Apr 29, 2012, at 6:07 PM, Ryan Schmidt wrote:

> Are you sure the mysql that's being started is the one MacPorts installed, 
> and not the one you installed in /usr/local? How are you starting / stopping 
> mysql?


The above is possibly the commonest mistake, and it is easy to check and 
correct.

One can easily determine which program is actually running by typing the 
following

        $ ps -ax | grep mysql

For example, if I run the above for postgres (I don't have mysql running to 
demonstrate that), I get

        $ps -ax | grep postgres   
61697 ??         0:00.11 /opt/local/bin/daemondo --label=postgresql91-server 
--start-cmd 
/opt/local/etc/LaunchDaemons/org.macports.postgresql91-server/postgresql91-server.wrapper
 start ; --stop-cmd 
/opt/local/etc/LaunchDaemons/org.macports.postgresql91-server/postgresql91-server.wrapper
 stop ; --restart-cmd 
/opt/local/etc/LaunchDaemons/org.macports.postgresql91-server/postgresql91-server.wrapper
 restart ; --pid=none
62940 ttys000    0:00.00 grep postgres


As is visible, it is the postgres version installed by MacPorts that is 
running. MacPorts installs *everything* under /opt/local and nothing anywhere 
else.

The next thing is to figure out which program will launch if you just type it 
on the command line. The easiest way to determine that is to type

        $ which <program name>

For example, with `pg_ctl` I get

        $which pg_ctl
        /opt/local/lib/postgresql91/bin/pg_ctl 

Also, check your path by typing the following

        $echo $PATH


That too will indicate which program will be launched if it were fired without 
explicitly specifying the path.

--
Puneet Kishor
_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to