Re: [MySQL] Install difficulties : Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock'
On Apr 1, 2008, at 9:08 AM, Bill Hernandez wrote:
On Apr 1, 2008, at 4:58 AM, sourceforge.rocks@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"
The following is displayed to the terminal after the successful completion of the "$ sudo port install mysql5 +server" command: ########################################################### # A startup item has been generated that will aid in # starting mysql5 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/ org.macports.mysql5.plist ########################################################### ---> Installing mysql5 5.0.51_0+server ****************************************************** * In order to setup the database, you might want to run * sudo -u mysql mysql_install_db5 * if this is a new install ****************************************************** Note the instructions in that last comment box. I was just copying and pasting the commands.
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
Yes, it does.
if you are not sure, cd into it...
Actually, a simple "echo $PATH" works.
shell> $ cd /opt/local/lib/mysql5/bin
shell> /opt/local/lib/mysql5/bin/ $ sudo mysql_install_db5 -- user=mysql
The "sudo -u ...." command seems to have worked (after the temp/ mysql5 directory was properly created).
Best Regards,
Bill Hernandez Plano, Texas
Cheers, Mike.
participants (1)
-
sourceforge.rocks@xemaps.com