<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I came up against a hidden problem this morning. Well, hidden to me up until now anyway. So in case anyone else finds themselves in the same boat - or similar….</div><div class=""><br class=""></div><div class="">I’m running opendmarc here, and the reporting script runs a subroutine called opendmarc-import where in it reads information from a mysql database.</div><div class=""><br class=""></div><div class="">I did a lot of updates yesterday. Added and subtracted things.</div><div class=""><br class=""></div><div class="">opendmarc-import worked fine yesterday, but on a clean restart this morning - it wouldn’t run.</div><div class=""><br class=""></div><div class=""><span style="font-family: Menlo; font-size: 11px;" class="">&nbsp; &nbsp; &nbsp;opendmarc-import: unable to connect to database: Can't connect to local MySQL server through socket '/opt/local/var/run/mysql56/mysqld.sock' (2)</span></div><div class=""><span style="font-family: Menlo; font-size: 11px;" class=""><br class=""></span></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">So I had a look at it and noticed&nbsp;immediately that it was looking at /usr/bin/perl on the first line. That’s normally fine. Except in&nbsp;this case it wasn’t.</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Because yesterday I archived the existing perl binaries in /usr/bin, and put links to /opt/local/bin/perl*</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">opendmarc-import barfed on that error - no&nbsp;mysql.sock, because I’mm running a different mysql. Built by Homebrew and I have a LOT of databases in the system, and have been reluctant to make any migration changes.&nbsp;</span></font></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">robert$ mysql -v</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Welcome to the MySQL monitor.&nbsp; Commands end with ; or \g.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Your MySQL connection id is 166</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Server version: 5.6.25 Homebrew</div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">So obviously what happened was this.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">The macports perl wanted to talk to macports mysql - and couldn’t. It’s not even running. A different mysql is running. So macports perl5-22 relies on having macports mysql installed in the /opt hierarchy somewhere. &nbsp;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">So my solution for now, was to replace the /usr/bin/perl* links to /opt/local/bin/perl* with the original /usr/bin/perl binaries that I had archived in a directory.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">So now I have&nbsp;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Apple’s perl binaries in /usr/bin again - which so far everything else seems happy with. Version P5.18 as it turns out.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Macport’s perl binaries in /opt/local/bin - which so far nothing seems to know about, except things that look for it specifically, and don’t need mysql. Version P5.22.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">mysql</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal;" class="">/usr/local/bin/mysql -&gt; ../Cellar/mysql/5.6.25/bin/mysql</div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">I don’t have macports mysql installed.</div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div><div class="">Also - When Apple updates it’s OS as it does from time to time, then what ever is in /usr/bin will again be overwritten by their own latest version of perl.</div><div class=""><br class=""></div><div class="">So now I have to figure out if it’s worth moving to macports mysql, and how??? so then I can hopefully also switch perl versions…. &nbsp;or just leave well enough alone.</div><div class="">&nbsp;</div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">Robert Chalmers</div><div class=""><a href="mailto:robert@chalmers.com" class="">robert@chalmers.com</a>.au&nbsp; Quantum Radio: <a href="http://tinyurl.com/lwwddov" class="">http://tinyurl.com/lwwddov</a></div><div class=""><div class="">Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of -&nbsp;</div><div class="">Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay</div></div></div><div class=""><br class=""></div></div></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>