[MySQL] Install difficulties : Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock'

Bill Hernandez ms at mac-specialist.com
Tue Apr 1 06:09:21 PDT 2008


On Apr 1, 2008, at 4:58 AM, sourceforge.rocks at xemaps.com wrote:

> A reference to this error log was in the message that appeared when  
> the "sudo -u mysql mysql_install_db5" command to create the initial  
> tables failed.


Since I converted to Leopard, I am using a MySQL binary install until  
I can get around to doing the whole MacPorts install, but basically  
depending upon whether it's a MacPorts install or not the only thing  
that should really change is the path to the script :

(your path to where the script is located would be different than mine)

In my case when I am using :

shell> $ cd /usr/local/mysql

shell> /usr/local/mysql $ sudo ./scripts/mysql_install_db

I'm not quite sure why you are using "sudo -u mysql mysql_install_db5"

following "sudo" there should be a command, not a switch "-u"

As I recall, for the MacPorts install you might try :

shell> $ sudo mysql_install_db5 --user=mysql

I assume your $PATH includes /opt/local/lib/mysql5/bin

if you are not sure, cd into it...

shell> $ cd /opt/local/lib/mysql5/bin

shell> /opt/local/lib/mysql5/bin/ $ sudo mysql_install_db5 --user=mysql

Best Regards,

Bill Hernandez
Plano, Texas





More information about the macports-users mailing list