mysql problem with socket

Mr. Puneet Kishor punk.kish at gmail.com
Sun Apr 29 16:50:29 PDT 2012


Yup, you are running the mysql version *not* installed by MacPorts. If you look below, you are running `/usr/local/mysql/bin/mysqld` which either you knowingly installed, or was installed by some other program without you realizing.

The reason `which mysqld` shows nothing is because /opt/local/lib/mysql5/bin is not in your path.

You should not start mysql via the Control Panel. That was not installed by MacPorts, and starting that is causing the issues that you are facing.


On Apr 29, 2012, at 6:40 PM, jeff at ayendesigns.com wrote:

> 'which' shows nothing for mysqld or mysql, but for mysql5 shows /opt/local...
> 
> ps reveals 
> 
> 2025 ?? 0:00.24 /opt/local/bin/daemondo --label=mysql5 --start-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper restart ; --pid=none
> 26834 ?? 0:00.02 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/MacBook-Pro.local.pid
> 26906 ?? 0:01.38 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/MacBook-Pro.local.err --pid-file=/usr/local/mysql/data/MacBook-Pro.local.pid
> 28475 ttys000 0:00.00 grep mysql
> 
> > 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 at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users



More information about the macports-users mailing list