From nobody Sat May 27 16:58:51 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QT7LT6FRHz4V2rd for ; Sat, 27 May 2023 16:59:29 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QT7LS57r7z3njd for ; Sat, 27 May 2023 16:59:28 +0000 (UTC) (envelope-from odhiambo@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b="oiR/Cemr"; spf=pass (mx1.freebsd.org: domain of odhiambo@gmail.com designates 2a00:1450:4864:20::229 as permitted sender) smtp.mailfrom=odhiambo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2af1a7d2f6aso19348161fa.1 for ; Sat, 27 May 2023 09:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685206766; x=1687798766; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZlCr+H769KPwVCqVZhdCc7Eord5Yr8ESl+PAlB6wK40=; b=oiR/CemrZa6Nh+0FbshMdXmZSX+Hdcm6gfK9DwCzGzvJ2Kx5gHf2izK0wQ3NofM6dg JnMOz0Y017WLuRiBQbtnjkQmUjcZNn398nA91bsRDnCcu0NnKmIQZoo0GMnzdc1eHoa1 7zWHAa9eXLz3lsBziNBQ57+kUvPGeUMkUejplOGb0+A0lcdWzXFTpk3xbKVlNkl8ZmJE AfJUECPHK3VmLTMec1M1Z7dq14vrVFVXhbKRIyVHMu/8yxDTaLmubTFlalVK3D13GGFM dB09TK6DP0q59/kfiKJ+T1WrBRoy/drvUus06JBBusBlOSzkAUNSmfVuiwH2zFym/INN eLLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685206766; x=1687798766; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZlCr+H769KPwVCqVZhdCc7Eord5Yr8ESl+PAlB6wK40=; b=caMWR2QlL+0YXXdEUppPFHJ5ANoLcoEIhl1PPYYa8Vq+6VUGDZ/AHBxMgzOHPp/XCG DegA+ubfefF8Ddi442wsGixY4FItaz6lzCrd50BRezTLT5P4tUu50I42FEoloRKt7Iyr Gq10RDP0pASHEPUyP1NrHIvYVM/tPvkLG+U5TCQqw+QgbJZgmnAMhz3jFHcdZsK6nPIh QVNdIj/WinRBAcTldiuN7tB7VmNWk1kIdsHOEc79SHV0Ua2mj1rlQ9IiCt74Htsjju8F oeF6t0RzL8glHjNXNDpEO06AEPLfFy+gVhxa8oKch7W053bRGa3DFKPj3cx8PVz9pffn mHVg== X-Gm-Message-State: AC+VfDwSDVlKzxKmXWILrwCxOKrfWCZ/FftBWBj5BT1nIdmPMsGpoXdg vUAW/UtyYWZj1+UmAWmSxaLywv6rqlSz7BDnMNA= X-Google-Smtp-Source: ACHHUZ7xeaHlFDLgLfMw+CNbg5Fdkb33xSaVhKMnknRAOUV2/SMJt0k0ENB/HeD/q8o8YcYpTKapLfYkJ0MLUndwRjc= X-Received: by 2002:a2e:9f47:0:b0:2a8:b286:8272 with SMTP id v7-20020a2e9f47000000b002a8b2868272mr1825897ljk.15.1685206766260; Sat, 27 May 2023 09:59:26 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Odhiambo Washington Date: Sat, 27 May 2023 19:58:51 +0300 Message-ID: Subject: Re: What happened to my /tmp/mysql.sock ?!!??! To: Aryeh Friedman Cc: FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000ad174e05fcafc638" X-Spamd-Result: default: False [-3.04 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.70)[-0.702]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_MEDIUM(-0.34)[-0.335]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::229:from]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::229:server fail]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; SUBJECT_ENDS_EXCLAIM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QT7LS57r7z3njd X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --000000000000ad174e05fcafc638 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, May 27, 2023 at 7:44=E2=80=AFPM Aryeh Friedman wrote: > On Sat, May 27, 2023 at 12:22=E2=80=AFPM Odhiambo Washington > wrote: > > > > > > > > On Sat, May 27, 2023 at 6:51=E2=80=AFPM Aryeh Friedman > wrote: > >> > >> I accidentally erased the above file and now no matter what I try > >> (even a complete fresh install of the OS!?!?!) I can not get it made.. > >> It appears it comes prebroken actually due to manually attempt to > >> start the service > >> > >> So the question is how on earth do I make this file... spent a while > >> searching the web and fighting with chatGPT to no avail. > > > > > > That file is created automatically when MySQL is started. It is a Unix > socket. > > You do not need a complete reinstall of the OS to solve this problem. > > Just find out what is stopping MySQL service from starting. > > You do not even need to reinstall MySQL! > > root@sarek1024:~ # ls /tmp/m* > ls: No match. > root@sarek1024:~ # service mysql-server onestart > // modified rc.d file to echo command as well as do it > /usr/local/bin/mysqld_safe --initialize > --defaults-extra-file=3D/usr/local/etc/mysql/my.cnf --basedir=3D/usr/loca= l > --datadir=3D/var/db/mysql --mysqld-file=3D/usr/local/libexec/mysqld > --user=3Dmysql > Starting mysql. > root@sarek1024:~ # !ls > ls /tmp/m* > ls: No match. > root@sarek1024:~ # mysql > ERROR 2002 (HY000): Can't connect to local MySQL server through socket > '/tmp/mysql.sock' (2) > root@sarek1024:~ # tail -20 /var/log/messages > May 27 05:32:01 sarek1024 pkg-static[82552]: libXScrnSaver-1.2.4 installe= d > May 27 05:32:09 sarek1024 pkg-static[88080]: tk86-8.6.13 installed > May 27 05:34:47 sarek1024 pkg-static[99500]: shc-4.0.3 installed > May 27 05:34:48 sarek1024 pkg-static[99839]: tk-wrapper-1.1_3 installed > May 27 05:34:48 sarek1024 pkg-static[99963]: tkdiff-5.0 installed > May 27 05:34:48 sarek1024 pkg-static[160]: aegis-4.25_14 installed > May 27 05:35:00 sarek1024 pkg-static[5372]: gsed-4.9 installed > May 27 05:35:59 sarek1024 pkg-static[81263]: lsof-4.97.0,8 installed > May 27 05:36:00 sarek1024 pkg-static[81390]: libexplain-1.3.D012_6 > installed > May 27 05:36:04 sarek1024 pkg-static[83063]: fhist-1.21_6 installed > May 27 05:36:23 sarek1024 pkg-static[86662]: cook-2.30_3 installed > May 27 05:36:24 sarek1024 pkg-static[87421]: log4j-1.2.17 installed > May 27 05:36:24 sarek1024 pkg-static[87556]: > mysql-connector-java51-5.1.49 installed > May 27 07:18:39 sarek1024 su[87745]: aryeh to root on /dev/pts/0 > May 27 07:20:44 sarek1024 aryeh[88442]: > /usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for > mysql > May 27 07:22:38 sarek1024 aryeh[88484]: > /usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for > mysql > May 27 07:27:13 sarek1024 aryeh[88574]: > /usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for > mysql > May 27 07:33:42 sarek1024 aryeh[89279]: > /usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for > mysql > May 27 07:34:42 sarek1024 aryeh[89290]: > /usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for > mysql > May 27 07:35:28 sarek1024 aryeh[89303]: > /usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql > cd /var/db/mysql/ less FQDN.err (FQDN =3D Fully Qualified Domain Name) That file will tell you why msql is not able to start. PS: If this is a new machine, then: rm -rf /var/db/mysql Then try starting MySQL service again. Check if the directory is recreated and read the contents of the file with .err extension. --=20 Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' =C2=AF\_(=E3=83=84)_/=C2=AF :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html] --000000000000ad174e05fcafc638 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, May 27, 2023 at 7:44=E2=80=AF= PM Aryeh Friedman <aryeh.fri= edman@gmail.com> wrote:
On Sat, May 27, 2023 at 12:22=E2=80=AFPM Odhiambo Washington= <odhiambo@gmail= .com> wrote:
>
>
>
> On Sat, May 27, 2023 at 6:51=E2=80=AFPM Aryeh Friedman <aryeh.friedman@gmail.com= > wrote:
>>
>> I accidentally erased the above file and now no matter what I try<= br> >> (even a complete fresh install of the OS!?!?!) I can not get it ma= de..
>> It appears it comes prebroken actually due to manually attempt to<= br> >> start the service
>>
>> So the question is how on earth do I make this file... spent a whi= le
>> searching the web and fighting with chatGPT to no avail.
>
>
> That file is created automatically when MySQL is started. It is a Unix= socket.
> You do not need a complete reinstall of the OS to solve this problem.<= br> > Just find out what is stopping MySQL service from starting.
> You do not even need to reinstall MySQL!

root@sarek1024:~ # ls /tmp/m*
ls: No match.
root@sarek1024:~ # service mysql-server onestart
// modified rc.d file to echo command as well as do it
/usr/local/bin/mysqld_safe --initialize
--defaults-extra-file=3D/usr/local/etc/mysql/my.cnf --basedir=3D/usr/local<= br> --datadir=3D/var/db/mysql --mysqld-file=3D/usr/local/libexec/mysqld
--user=3Dmysql
Starting mysql.
root@sarek1024:~ # !ls
ls /tmp/m*
ls: No match.
root@sarek1024:~ # mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket<= br> '/tmp/mysql.sock' (2)
root@sarek1024:~ # tail -20 /var/log/messages
May 27 05:32:01 sarek1024 pkg-static[82552]: libXScrnSaver-1.2.4 installed<= br> May 27 05:32:09 sarek1024 pkg-static[88080]: tk86-8.6.13 installed
May 27 05:34:47 sarek1024 pkg-static[99500]: shc-4.0.3 installed
May 27 05:34:48 sarek1024 pkg-static[99839]: tk-wrapper-1.1_3 installed
May 27 05:34:48 sarek1024 pkg-static[99963]: tkdiff-5.0 installed
May 27 05:34:48 sarek1024 pkg-static[160]: aegis-4.25_14 installed
May 27 05:35:00 sarek1024 pkg-static[5372]: gsed-4.9 installed
May 27 05:35:59 sarek1024 pkg-static[81263]: lsof-4.97.0,8 installed
May 27 05:36:00 sarek1024 pkg-static[81390]: libexplain-1.3.D012_6 installe= d
May 27 05:36:04 sarek1024 pkg-static[83063]: fhist-1.21_6 installed
May 27 05:36:23 sarek1024 pkg-static[86662]: cook-2.30_3 installed
May 27 05:36:24 sarek1024 pkg-static[87421]: log4j-1.2.17 installed
May 27 05:36:24 sarek1024 pkg-static[87556]:
mysql-connector-java51-5.1.49 installed
May 27 07:18:39 sarek1024 su[87745]: aryeh to root on /dev/pts/0
May 27 07:20:44 sarek1024 aryeh[88442]:
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for
mysql
May 27 07:22:38 sarek1024 aryeh[88484]:
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for
mysql
May 27 07:27:13 sarek1024 aryeh[88574]:
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for
mysql
May 27 07:33:42 sarek1024 aryeh[89279]:
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for
mysql
May 27 07:34:42 sarek1024 aryeh[89290]:
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for
mysql
May 27 07:35:28 sarek1024 aryeh[89303]:
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for=C2=A0<= /blockquote>
mysql

cd=C2=A0=C2=A0/var/db= /mysql/

less FQDN.err (FQDN =3D Fully Qualified Domain N= ame)
That file will tell you why msql is not able to start.
=

PS: If this is a new machine, then:

rm -rf /var/db/mysql

Then try starting MySQL= service again.
Check if the directory is recreated and read the = contents of the file with .err extension.

<= span class=3D"gmail_signature_prefix">--
Best regards,Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223"Oh, the cruft.",=C2=A0= egrep -v '^$|^.*#'=C2=A0=C2=AF\_(=E3=83= =84)_/=C2=AF=C2=A0:-)
<= div>[How to ask smart questions:=C2=A0http://www.catb.org/~esr/faqs/sma= rt-questions.html]
--000000000000ad174e05fcafc638--