ctreleaven at cogeco.ca
Fri Jun 22 04:45:18 PDT 2012
At 12:04 AM -0500 6/22/12, Ryan Schmidt wrote:
>On Jun 21, 2012, at 09:15, Craig Treleaven wrote:
> > I was testing a fresh install of mysql51-server (on 10.7.4) and
>I'm having a problem that the socket is not where it is supposed to
>>> $ mysql5 < /opt/local/share/mythtv/database/mc.sql
>>> ERROR 2002 (HY000): Can't connect to local MySQL server through
>>>socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
>>> $ mysql_config5 --socket
>The mysql5 and mysql_config5 programs are from the mysql5 port. And
>/opt/local/var/run/mysql5/mysqld.sock is where the mysql5-server
>program would place its socket by default, though you can override
>it by editing /opt/local/etc/mysql5/my.cnf.
>>> $ ls -al /opt/local/var/run/mysql5/mysqld.sock
>>> ls: /opt/local/var/run/mysql5/mysqld.sock: No such file or directory
>>> $ ls -al /opt/local/var/run/mysql51
>>> total 0
>>> drwxr-xr-x 4 _mysql _mysql 136 21 Jun 08:50 .
>>> drwxr-xr-x 5 root admin 170 21 Jun 09:06 ..
>>> -rw-r--r-- 1 root _mysql 0 3 May 14:22 .turd_mysql51-server
>>> srwxrwxrwx 1 _mysql _mysql 0 21 Jun 08:50 mysqld.sock
>> I tried to use /opt/local/etc/mysql51/my.cnf to indicate the socket:
>>> # Use default MacPorts settings
>>> !include /opt/local/etc/mysql51/macports-default.cnf
>>> # WCT modifications 2012Jun21 -
>>> port = 3306
>>> socket = /opt/local/var/run/mysql51/mysqld.sock
>/opt/local/var/run/mysql51/mysqld.sock is where the mysql51-server
>port would put its socket and where the mysql51 port's mysql program
>would look for it, though you can change that by editing
>So the problem is you are mixing and matching things. You've got the
>new mysql51-server running, but are trying to talk to it using the
>old mysql5 port. Decide whether you want to use the old mysql5 ports
>or the new mysql51 ports.
Ahh, I hadn't realized the distinction between mysql5 and mysql51*.
The mysql51-server port didn't indicate it was incompatible with
mysql5 client--even though it is. I take it this "5" v. "51" is a
temporary situation? Otherwise, it would seem this could trip up
* BTW, after yesterday's commit, mysql5 and mysql5-server are at
5.1.62 whereas mysql51 and mysql51-server are at 5.1.63.
More information about the macports-dev