mysql problem with socket

Ryan Schmidt ryandesign at macports.org
Sun Apr 29 20:27:45 PDT 2012


On Apr 29, 2012, at 19:57, Mr. Puneet Kishor wrote:

> 
> On Apr 29, 2012, at 7:47 PM, jeff at ayendesigns.com wrote:
> 
>> There is no mysqld in that directory ... there are mysqld_multi and mysqld_safe, but with that path added to $PATH 'which' still comes up empty
>> 
> 
> 
> Aaaaah... well, mysqld_safe is just a safe version of starting the mysql daemon. So, the only issue is that you somehow have mysql installed under /usr/local (dunno how it got there, but you must have installed it somehow without realizing), and also one installed under /opt/local (installed by macports).
> 
> So, you just want the one from macports to start up.
> 
> First, make sure the one under /usr/local is turned off. You can do so via System Preferences. Once you turn it off, make sure it is really off by looking in the Activity Monitor (you can filter by 'mysql') which is really just a gui front-end to ps.
> 
> Then, make sure /opt/local/lib/mysql5/bin is in your path. You can set the path variable in .bashrc or .bash_profile (which is usually called by .bashrc). Once you set that, you can either quit Terminal and start it again, or just type 	`source ~/.bash_profile` to make sure the new setting of path takes effect.
> 
> Then, start macport's mysql by typing `sudo port load <name of the port>` (I don't know the exact name of the mysql port installed by macport.
> 
> Check again that mysql is running. If it is not, then mysql didn't start because of some other reason. Check the logs to figure out why.
> 
> Yes, all this is frustrating and mysterious for us who are not so versed in all this, but the good thing is that you have to figure this out only once. Once you figure it out, one, you know how forever, and two, you never have to worry about it.

A guide for setting up MacPorts MySQL is here:

https://trac.macports.org/wiki/howto/MAMP#mysql

Hopefully those instructions haven't bitrotted too much.





More information about the macports-users mailing list