<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="">Problem SOLVED!<div class=""><br class=""></div><div class="">Trouble was in my.cnf I had specified </div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>pid-file = /opt/local/var/run/mysq8/mysqld.pid</div><div class=""><br class=""></div><div class="">but apparently mysqld could not write to that directory — even though I had previously executed</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span><span style="font-size: 13px; background-color: rgb(247, 247, 247);" class="">sudo chown -R _mysql:_mysql /opt/local/var/run/mysql8/ </span><div class=""> </div><div class="">and when I checked there the correct ownership was in effect.</div><div class=""><br class=""></div><div class="">By commenting out the “pid-file=…” line in my.cnf, the mysql8-server starts normally and I can connect to it with the mysql (= mysql8) client.</div><div class=""><br class=""></div><div class="">Still somewhat mysterious!</div><div><br class=""><blockquote type="cite" class=""><div class="">On 4 Oct2020, at 4:03 AM, Ryan Schmidt <<a href="mailto:ryandesign@macports.org" class="">ryandesign@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Oct 3, 2020, at 12:05, Murray Eisenberg wrote:<br class=""><br class=""><blockquote type="cite" class="">On 3 Oct2020, at 8:00 AM,Andrew Udvare  wrote:<br class=""><br class=""><blockquote type="cite" class="">Your client is trying to connect<br class="">/opt/local/var/run/mysql57/mysqld.sock instead of<br class="">/opt/local/var/run/mysql8/mysqld.sock . Your client is not finding the<br class="">correct socket path in my.cnf. You can specify which socket to connect<br class="">to manually:<br class=""><br class="">mysql -S /opt/local/var/run/mysql8/mysqld.sock ...<br class=""><br class="">If you are running mysql8, does /opt/local/var/run/mysql8/mysqld.sock<br class="">exist? It may be that your my.cnf says to put it at the old path.<br class=""></blockquote><br class="">(a) No, there is no such file /opt/local/var/run/mysql8/mysql.sock ! <br class=""><br class="">After loading mysql8-server, the only files in  /opt/local/var/run/mysql8 are .turd_mysql8-server and  mysqld.pid.<br class=""><br class="">How is that file created?<br class=""></blockquote><br class="">The server creates the socket file when it starts.<br class=""><br class="">The file mysqld.pid presumably contains a process ID number. Is there a process currently running with that process ID number? If yes, is it mysqld? If there is no such process, or if it is not mysqld, try deleting mysqld.pid.<br class=""><br class=""><blockquote type="cite" class="">(b) Manually specifying the socket gives the same kind of error as before:<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 load mysql8-server<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span>--->  Loading startupitem 'mysql8-server' for mysql8-server <br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">      </span>mysql -S /opt/local/var/run/mysql8/mysqld.sock<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/mysql8/mysqld.sock' (2)<br class=""></blockquote><br class="">Then I guess there is no such socket file, perhaps because your server has not started.<br class=""><br class=""><br class=""></div></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></body></html>