[MySQL] Install difficulties : Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Bill Hernandez ms at mac-specialist.com
Sun Jun 24 22:03:01 PDT 2007


On Jun 24, 2007, at 11:21 PM, Ryan Schmidt wrote:

> I'm going to snip right there because you've written such a  
> voluminous message that I'm having immense difficulties taking it  
> all in. But as has been pointed out, /tmp/mysql.sock is not where  
> the MacPorts mysql5 puts its socket. (/tmp/mysql.sock is where the  
> mysql.com binary distribution puts its socket file.) Why is your  
> mysql looking for the socket in /tmp/mysql.sock? Have you  
> configured your my.cnf to point to that location? If so, take those  
> lines out and let mysql find the socket files in the default location.
>

HERE'S A BRIEF VERSION OF MY MESSAGE

My message was voluminous, because I've been trying to get this to  
work for several days, and had no luck getting docs that explained  
the setup used by MacPorts. While I was waiting for this reply I  
downloaded the MySQL for OSX from MySQL.com and got it running in  
about 20 minutes, and within a brief time after that I had imported  
all my data.

It uses a fairly simple hierarchy:

/usr/local/mysql
/usr/local/mysql/data

MacPorts appears to use several directories, which probably all need  
to have the ownership/permissions set correctly :

/opt/local/bin/mysql5
/opt/local/etc/mysql5
/opt/local/include/mysql5
/opt/local/lib/mysql5
/opt/local/share/mysql5
/opt/local/var/db/mysql5
/opt/local/var/run/mysql5

I am sure there is a great reason for the over-complicated hierarchy  
which I do not see at this point, but the standard install where all  
the mySQL stuff goes in one dir seems a lot easier to deal with, even  
for browsing purposes. Although as a work-around I could create a  
dummy directory with aliases to all these other directories in order  
to simplify the process of becoming familiar with the distributed  
contents.

Setting permissions for the installations at /usr/local/mysql was  
fairly simple and only involved two sets of permissions, one for the  
main directory, and a different one for the data dir, and like I said  
previously I got that version up and running in about 20 minutes, vs  
several days that I've been trying to get the MacPorts MySQL working.  
I am not trying to be ungrateful, I am just not sure why this  
implementation is so over-complicated ?

/usr/local/mysql
/usr/local/mysql/data   --> data file, which translates to -->  /opt/ 
local/var/db/mysql5

I didn't find any documentation on this type of setup. All the docs I  
found refer to the /usr/local/mysql self contained type of installation.

  I was not able to locate any documentation on what the MacPorts  
implementation required, such as my.cnf, and where any of this stuff  
is supposed to live.

I ask again, Is there any documentation ?

Also the log showed this :

/opt/local/var/db/mysql5/my_hostname.local.err

070624 18:11:24  mysqld started
070624 18:11:24 [ERROR] /opt/local/libexec/mysqld: unknown option '-S'

070624 18:11:24  mysqld ended

070624 18:40:58  mysqld started
070624 18:40:58 [ERROR] /opt/local/libexec/mysqld: unknown option '-S'

070624 18:40:58  mysqld ended


THE FILE "mysql-test-run.pl " DOES NOT EXIST, NEITHER DOES THE DIR  
"mysql-test"
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Also, has anybody documented how they got this implementation working ?

Are there any step by step docs for this implementation ?

  Any ideas ?

Best Regards,

Bill Hernandez



More information about the macports-users mailing list