From nobody Sat May 27 17:04:13 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 4QT7SB5p31z4V3N1 for ; Sat, 27 May 2023 17:04:26 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 4QT7SB0LR6z3plN for ; Sat, 27 May 2023 17:04:26 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-513fd8cc029so3289808a12.3 for ; Sat, 27 May 2023 10:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685207065; x=1687799065; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aGfLKppCmCwoOw/E2CXP4R70rqd2ZQ5KDGVtpn3FBqI=; b=hdCx/74c9qMXnwNlrX16my/S8E0dN5PobYVcE5a9tsSgw9sbj+ZeVf58n+zcpNg4Il uLIkNRzJa0wRHHUTRew0aRLPTB2GHXqDowZIjekbUEzF+8pbYpKdL+k4eaNomKnQ5DHK iVBuHKbSH23MfCuMsb5sZxpQmqLVFCtnsAT40skBgi62VJ5cUubQOiBZ3Wei7MXHZLzC /Fw3wYK2Kipy8sR9nqaKNK17wnL35zEDnli2VBCrt//aXfXp17Nbo2M1Y2WrVRJNRf35 eAEv4B82Ehqzk1p+A9/7OeALr9tueCac5Be2DwIttxcf2i9vQ3TBf3dAfqRvnp1thCTG SrXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685207065; x=1687799065; h=content-transfer-encoding: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=aGfLKppCmCwoOw/E2CXP4R70rqd2ZQ5KDGVtpn3FBqI=; b=Nr2R9YLkLCUT2NQDvb924Xzb0sjMLCS5zRxAWk6uUHAdH8VwvoYgxBlT+WuHzWzvYm EYb5YQEtFcfO3plU9j2zDssxiWh4l+YzCFWPsYHxFbvCkZJ8RPbDK5k2PHNUHi7MmqVr ZJadvSB2q3JxUawVcDQkmG3rXzCZoeFJyqlM0Y0iAmf+BowsbCvAqnkbWo/1aaBYKpaE M7gPdubvdQ0LcDCxKp0oB37v2NGBr/1U+gySTP/teJT7JnjN1Ne7r+36hTUUFH7D1F6j 8q72WK+gP7/xoT296wEEpH3gX2obXJm9u4dO80obSm05qy2rBeAd7t6yKkbwEVXgWZWE xovg== X-Gm-Message-State: AC+VfDzCz1TNo04AnzrVN/Kuq5v1n+gYw5OvDluli2CYLn56LJXAc7iT gv+MEm/1765Z6AgdQDww404x0oDflb7ViPlm0dgKR9vxMhM= X-Google-Smtp-Source: ACHHUZ5SUoPx4COj9gdEUOqoVlGssz0rRyBMt58a2i1gSgu5vj//v7r927k2/pgBuIuasKxwP4cEM/1w+FlyfK/VZ8A= X-Received: by 2002:a17:907:72c7:b0:96f:9cea:a351 with SMTP id du7-20020a17090772c700b0096f9ceaa351mr6077612ejc.37.1685207064239; Sat, 27 May 2023 10:04:24 -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: Aryeh Friedman Date: Sat, 27 May 2023 13:04:13 -0400 Message-ID: Subject: Re: What happened to my /tmp/mysql.sock ?!!??! To: Odhiambo Washington Cc: FreeBSD Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QT7SB0LR6z3plN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, May 27, 2023 at 12:59=E2=80=AFPM Odhiambo Washington wrote: > > > > 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/loc= al >> --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 install= ed >> 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 insta= lled >> 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. No errors I can see 2023-05-27T11:38:45.6NZ mysqld_safe mysqld from pid file /var/db/mysql/sarek1024.pid ended 2023-05-27T12:40:12.6NZ mysqld_safe Logging to '/var/db/mysql/sarek1024.err= '. 2023-05-27T12:40:12.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 2023-05-27T12:40:12.615584Z 0 [Note] /usr/local/libexec/mysqld (mysqld 5.7.41-log) starting as process 96819 ... 2023-05-27T12:40:12.635072Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2023-05-27T12:40:12.635084Z 0 [Note] InnoDB: Uses event mutexes 2023-05-27T12:40:12.635086Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2023-05-27T12:40:12.635089Z 0 [Note] InnoDB: Compressed tables use zlib 1.2= .13 2023-05-27T12:40:12.635228Z 0 [Note] InnoDB: Number of pools: 1 2023-05-27T12:40:12.635274Z 0 [Note] InnoDB: Using CPU crc32 instructions 2023-05-27T12:40:12.636011Z 0 [Note] InnoDB: Initializing buffer pool, total size =3D 1G, instances =3D 8, chunk size =3D 128M 2023-05-27T12:40:12.688662Z 0 [Note] InnoDB: Completed initialization of buffer pool 2023-05-27T12:40:12.711899Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2023-05-27T12:40:12.728870Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2023-05-27T12:40:12.728995Z 0 [Note] InnoDB: Setting file '/var/db/mysql/ibtmp1' size to 128 MB. Physically writing the file full; Please wait ... 2023-05-27T12:40:12.729228Z 0 [Note] InnoDB: Progress in MB: 100 2023-05-27T12:40:12.772954Z 0 [Note] InnoDB: File '/var/db/mysql/ibtmp1' size is now 128 MB. 2023-05-27T12:40:12.773348Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2023-05-27T12:40:12.773353Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2023-05-27T12:40:12.773604Z 0 [Note] InnoDB: Waiting for purge to start 2023-05-27T12:40:12.830802Z 0 [Note] InnoDB: 5.7.41 started; log sequence number 1209980 2023-05-27T12:40:12.830904Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/db/mysql/ib_buffer_pool 2023-05-27T12:40:12.831030Z 0 [Note] Plugin 'FEDERATED' is disabled. mysqld: Table 'mysql.plugin' doesn't exist 2023-05-27T12:40:12.831106Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 2023-05-27T12:40:12.831569Z 0 [Note] InnoDB: Buffer pool(s) load completed at 230527 8:40:12 2023-05-27T12:40:12.832938Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2023-05-27T12:40:12.833982Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them. 2023-05-27T12:40:12.833987Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory. 2023-05-27T12:40:12.833990Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher. 2023-05-27T12:40:12.833992Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher. 2023-05-27T12:40:12.834626Z 0 [Warning] CA certificate ca.pem is self signe= d. 2023-05-27T12:40:12.834660Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory. 2023-05-27T12:40:12.834840Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306 2023-05-27T12:40:12.834856Z 0 [Note] - '127.0.0.1' resolves to '127.0.0.1= '; 2023-05-27T12:40:12.834878Z 0 [Note] Server socket created on IP: '127.0.0.= 1'. 2023-05-27T12:40:12.835587Z 0 [Warning] Failed to open optimizer cost constant tables 2023-05-27T12:40:12.835631Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 2023-05-27T12:40:12.835637Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files. 2023-05-27T12:40:12.835752Z 0 [ERROR] Aborting 2023-05-27T12:40:12.835775Z 0 [Note] Binlog end 2023-05-27T12:40:12.835849Z 0 [Note] Shutting down plugin 'ngram' 2023-05-27T12:40:12.835852Z 0 [Note] Shutting down plugin 'partition' 2023-05-27T12:40:12.835854Z 0 [Note] Shutting down plugin 'BLACKHOLE' 2023-05-27T12:40:12.835855Z 0 [Note] Shutting down plugin 'ARCHIVE' 2023-05-27T12:40:12.835856Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHE= MA' 2023-05-27T12:40:12.835881Z 0 [Note] Shutting down plugin 'MRG_MYISAM' 2023-05-27T12:40:12.835883Z 0 [Note] Shutting down plugin 'MyISAM' 2023-05-27T12:40:12.835887Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTU= AL' 2023-05-27T12:40:12.835889Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAF= ILES' 2023-05-27T12:40:12.835890Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 2023-05-27T12:40:12.835891Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 2023-05-27T12:40:12.835892Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREI= GN' 2023-05-27T12:40:12.835894Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELD= S' 2023-05-27T12:40:12.835895Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUM= NS' 2023-05-27T12:40:12.835896Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEX= ES' 2023-05-27T12:40:12.835897Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 2023-05-27T12:40:12.835899Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLE= S' 2023-05-27T12:40:12.835900Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 2023-05-27T12:40:12.835901Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 2023-05-27T12:40:12.835902Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG= ' 2023-05-27T12:40:12.835904Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 2023-05-27T12:40:12.835905Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETE= D' 2023-05-27T12:40:12.835906Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 2023-05-27T12:40:12.835907Z 0 [Note] Shutting down plugin 'INNODB_METRICS' 2023-05-27T12:40:12.835909Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO' 2023-05-27T12:40:12.835910Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 2023-05-27T12:40:12.835911Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 2023-05-27T12:40:12.835912Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PA= GE' 2023-05-27T12:40:12.835913Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 2023-05-27T12:40:12.835915Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_I= NDEX' 2023-05-27T12:40:12.835916Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RE= SET' 2023-05-27T12:40:12.835917Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM' 2023-05-27T12:40:12.835918Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET= ' 2023-05-27T12:40:12.835920Z 0 [Note] Shutting down plugin 'INNODB_CMP' 2023-05-27T12:40:12.835921Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAIT= S' 2023-05-27T12:40:12.835922Z 0 [Note] Shutting down plugin 'INNODB_LOCKS' 2023-05-27T12:40:12.835923Z 0 [Note] Shutting down plugin 'INNODB_TRX' 2023-05-27T12:40:12.835925Z 0 [Note] Shutting down plugin 'InnoDB' 2023-05-27T12:40:12.835975Z 0 [Note] InnoDB: FTS optimize thread exiting. 2023-05-27T12:40:12.836025Z 0 [Note] InnoDB: Starting shutdown... 2023-05-27T12:40:12.938988Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/db/mysql/ib_buffer_pool 2023-05-27T12:40:12.972821Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 230527 8:40:12 2023-05-27T12:40:14.373206Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1209999 2023-05-27T12:40:14.374428Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2023-05-27T12:40:14.374445Z 0 [Note] Shutting down plugin 'MEMORY' 2023-05-27T12:40:14.374449Z 0 [Note] Shutting down plugin 'CSV' 2023-05-27T12:40:14.374452Z 0 [Note] Shutting down plugin 'sha256_password' 2023-05-27T12:40:14.374454Z 0 [Note] Shutting down plugin 'mysql_native_password' 2023-05-27T12:40:14.374562Z 0 [Note] Shutting down plugin 'binlog' 2023-05-27T12:40:14.375213Z 0 [Note] /usr/local/libexec/mysqld: Shutdown complete 2023-05-27T12:40:14.6NZ mysqld_safe mysqld from pid file /var/db/mysql/sarek1024.pid ended > > 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 wit= h .err extension. > > -- > 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-question= s.html] --=20 Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org