Perl not connecting to MySQL [Solved]

MacPorts macports at hyperbole-software.com
Mon Mar 11 04:10:51 UTC 2019


I noticed that the socket in /var/mysql is called mysql.sock while the
one in /opt/local/var/run/mysql5 is called mysqld.sock (note the 'd'
between 'l' and '.').

I tried using
   $ sudo ln -s /var/mysql/mysql.sock /opt/local/var/run/mysql5/mysqld.sock

for some reason that also didn't work.

Then I tried:
   $ sudo ln -s /var/mysql/mysql.sock /opt/local/var/run/mysql5/mysql.sock
   $ sudo mv /opt/local/var/run/mysql5/mysql.sock
/opt/local/var/run/mysql5/mysqld.sock

this worked. I don't know why this worked and making the link directly
didn't, but at least it's working now.



Carl.


 
> I found this thread:
> http://mac-os-forge.2317878.n4.nabble.com/bp-seqfeature-load-pl-module-cannot-connect-to-mysql-td140155.html
> which recommends that you create a link from /var/mysql/mysql.sock to
> /opt/local/var/run/mysql5.
>    ( you may need to sudo mkdir -v /opt/local/var/run/mysql5 first)
>    $ sudo ln -s /var/mysql/mysql.sock /opt/local/var/run/mysql5
>
> I make the link, but Perl still can't connect to local MySQL server
> through socket '/opt/local/var/run/mysql57/mysqld.sock'.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190311/3624e032/attachment.html>


More information about the macports-users mailing list