<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">No, I do not find any my.cnf in my datadir.<div class=""><br class=""></div><div class="">There were two problems here, the first of which I’ve fixed.<br class=""><div class=""><br class=""></div><div class=""><div class="">(1) FIXED: Trouble caused by mysql client binary being no found or pointing to <span style="font-family: Menlo; font-size: 13px;" class="">mysql57</span> rather than <span style="font-family: Menlo; font-size: 13px;" class="">mysql8</span>.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- For my default interactive shell zsh, getting rid of loading <span style="font-family: Menlo; font-size: 13px;" class="">oh-my-zsh.sh</span> in <span style="font-family: Menlo; font-size: 13px;" class="">.zshrc</span>.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- For both zsh and bash, fixing <span style="color: rgb(255, 255, 255); font-family: Menlo; font-size: 13px; background-color: rgb(0, 0, 0);" class="">.profile</span> so that I have <span style="font-family: Menlo; font-size: 13px;" class="">/opt/local/lib/mysql8/bin</span> near the start of my path (instead of <span style="font-family: Menlo; font-size: 13px;" class="">/opt/local/lib/mysql57/bin</span>).</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>using zsh as the default interactive shell.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>After those fixes, and after, of course...</div><div class=""><br class=""></div><div class=""><div><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="font-family: Menlo; font-size: 13px;" class="">sudo port select mysql mysql8</span></div><div style="font-family: Menlo; font-size: 13px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Selecting 'mysql8' for 'mysql' succeeded. 'mysql8' is now active.</span></div></div></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>…now the correct client is being found:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span style="font-family: Menlo; font-size: 13px;" class="">sudo port load mysql8-server</span></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>---> Loading startupitem 'mysql8-server' for mysql8-server</span></div></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span></span>which mysql</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="font-family: Menlo; font-size: 13px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span></span>/opt/local/lib/mysql8/bin/mysql</div></div></div><div class=""><br class=""></div><div class=""><div>(2) NOT FIXED: Whether now in zhs or bash, there’s something wrong with the socket</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><span style="font-family: Menlo; font-size: 13px;" class="">sudo port load mysql8-server</span></div><div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>Loading startupitem 'mysql8-server' for mysql8-server</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="font-family: Menlo; font-size: 13px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-family: Helvetica; font-size: 14px;" class=""><br class=""></span></div><div style="font-family: Menlo; font-size: 13px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span> mysql # [or use: /opt/local/bin/mysql]</div><div style="font-size: 13px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="font-family: Menlo; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql8/mysqld.sock' (2)</span></div><div style="font-family: Menlo; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><div style="font-family: Menlo; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span style="font-family: Helvetica; font-size: 14px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>And that is despite having </span>/opt/local/etc/mysql8/my.cnf<span style="font-family: Helvetica; font-size: 14px;" class=""> being:</span></span></div><div style="font-family: Menlo; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span style="font-family: Helvetica; font-size: 14px;" class=""><br class=""></span></span></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span style="font-size: 13px; font-variant-ligatures: no-common-ligatures;" class=""><span style="font-size: 14px;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span></span></span># Use default MacPorts settings </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>!include /opt/local/etc/mysql8/macports-default.cnf </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><br class=""></font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>[mysqld] </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>datadir = /Users/murray/Databases/mysql/data </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>socket = /opt/local/var/run/mysql8/mysqld.sock </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>pid-file = /opt/local/var/run/mysqld/mysqld.pid </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><br class=""></font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>sql_mode=NO_ENGINE_SUBSTITUTION,STRICTΩTRANS_TABLES </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><br class=""></font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>[client] </font></div><div style="font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>socket = /opt/local/var/run/mysql8/mysqld.sock</font></div><div style="font-family: Helvetica; font-size: 14px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class=""></div></span></div></div></div></div><div><br class=""><blockquote type="cite" class=""><div class="">On 2 Oct2020, at 9:05 PM, Ryan Schmidt <<a href="mailto:ryandesign@macports.org" class="">ryandesign@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On Oct 2, 2020, at 19:36, Murray Eisenberg wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Assuming I do _not_ want to initialize the database, given that I want to use an existing (MySQL 5.7) database with the newly installed MySQL8, I loaded mysql8-server, then tried to connect to it:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>mysql<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql57/mysqld.sock' (2)<br class=""><br class="">Note:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>sudo port select --show mysql<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>The currently selected version for 'mysql' is 'mysql8’.<br class=""><br class="">So the error from trying to execute ‘mysql’ is surprising! Here’s my configuration file /opt/local/etc/mysql8/my.cnf :<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span># Use default MacPorts settings<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>!include /opt/local/etc/mysql8/macports-default.cnf<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>[mysqld]<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>datadir = /Users/murray/Databases/mysql/data<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>port = 3306<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>socket = /opt/local/var/run/mysql8/mysqld.sock<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>pid-file = /opt/local/var/run/mysqld/mysqld.pid<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES<span class="Apple-converted-space"> </span><br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>[client]<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>socket = /opt/local/var/run/mysql8/mysqld.sock<br class=""><br class="">What’s wrong??<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I'm not sure. Your questions are probably not specific to MacPorts; they're more MySQL-specific, so you might have more luck asking in a MySQL support venue.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">What does "which mysql" say? What about "mysql --version"?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Could there be a my.cnf file in /Users/murray/Databases/mysql/data that's overriding your settings?</span></div></blockquote></div><br class=""><div class="">
---<br class="">Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;"> </span><a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a><br class="">503 King Farm Blvd #101<span class="Apple-tab-span" style="white-space: pre;"> </span>Home (240)-246-7240<br class="">Rockville, MD 20850-6667<span class="Apple-tab-span" style="white-space: pre;"> </span>Mobile (413)-427-5334<br class=""><br class="">
</div>
<br class=""></div></div></div></body></html>