From nobody Sat Dec 23 01:41:54 2023
X-Original-To: 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 4Sxn346Sg5z54m8J
	for <questions@mlmmj.nyi.freebsd.org>; Sat, 23 Dec 2023 01:42:08 +0000 (UTC)
	(envelope-from gobble.wa@gmail.com)
Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35])
	(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 4Sxn340Gn1z4vkk
	for <questions@freebsd.org>; Sat, 23 Dec 2023 01:42:08 +0000 (UTC)
	(envelope-from gobble.wa@gmail.com)
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=gmail.com header.s=20230601 header.b=EdPs+kmi;
	spf=pass (mx1.freebsd.org: domain of gobble.wa@gmail.com designates 2001:4860:4864:20::35 as permitted sender) smtp.mailfrom=gobble.wa@gmail.com;
	dmarc=pass (policy=none) header.from=gmail.com
Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-2041c292da8so1455007fac.3
        for <questions@freebsd.org>; Fri, 22 Dec 2023 17:42:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1703295726; x=1703900526; darn=freebsd.org;
        h=content-transfer-encoding:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=oEgnCIPnOiQsWdIprtX1fmCqnhAT1akpKfXbLu78G9s=;
        b=EdPs+kmiWpk9/tsSMdTM4m1c9sOETKAnhixJM0YOANosPanU2V6+SVUlBBkzCcR4zO
         HBvfHtfu1obPxTeWemLvEptPFeRyACJg3TEPv1LncmRb8p+2Cwm7CctynQIbonxUwKdT
         kq90kz21bUa6qlY7EE9v0i5eniExITRWzq3h0ZY3ZBBigWEpQOt1632ZgON44IUmP4PK
         CDCOowxUPPTV/c5z8Kxc47xiyWRD+IofoUZz0tzS09xrlpYhQFuhupWpvaLyhuld/8Dh
         YZfR5dbO0b7iJGhr6Bc8mIblvjJiJCRW6CeZW54rDL8UUeCezlwkQyTUwQ5Dl9nFci/A
         rtMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1703295726; x=1703900526;
        h=content-transfer-encoding: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=oEgnCIPnOiQsWdIprtX1fmCqnhAT1akpKfXbLu78G9s=;
        b=MzJEdMMG+XrnPbNnqb4j0hTnnXnLqGqyDd4k33KMd/PuzthJjyApeKj/RtZEpemn3U
         aSj+eo85nivVGHPofim23lVCtOkgszu5WGSVURfo5ZS6jG8RLk9aBNnDZng5ClUrTmM5
         n0DgqXpC4NCucC435Q7dHDQmdLKf7X9nGI2+8Rz8wxvDavKF1BBFq4fuKaCUC5K7AoLn
         5WIKmCT2hpmv4l6NKHbfDop3OHig9nuBbc1umoLR7ySXiVUyKmga69Sgna9mD4GCZXr+
         v5KDZoKJ0Nx0i2XeoEDBcABOJ18ZxAccvuVR9WPS29tYcfj8UZ8KYpcxt8++Ky1lPa0Z
         wupQ==
X-Gm-Message-State: AOJu0YwdJWp1k6beHrWL+7x8F0dzRz+lhOjVyIUb3bodV4CQohpYIdP4
	5v1t5BM4KDgItegIClG+Rc5jOnP8jdf3HnPQ6dney0g+gZLj+Q==
X-Google-Smtp-Source: AGHT+IHdLOatMkNQPWM84vpxRPSf821O2lsf6wFujfrVIIHVIh7Wu7MqVZPlv5bDj6N2p2+fuEr67oY0L8BbzQOeJb4=
X-Received: by 2002:a05:6871:494:b0:204:19c6:71bf with SMTP id
 f20-20020a056871049400b0020419c671bfmr1873392oaj.91.1703295726217; Fri, 22
 Dec 2023 17:42:06 -0800 (PST)
List-Id: User questions <freebsd-questions.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-questions
List-Help: <mailto:questions+help@freebsd.org>
List-Post: <mailto:questions@freebsd.org>
List-Subscribe: <mailto:questions+subscribe@freebsd.org>
List-Unsubscribe: <mailto:questions+unsubscribe@freebsd.org>
Sender: owner-freebsd-questions@freebsd.org
X-BeenThere: freebsd-questions@freebsd.org
MIME-Version: 1.0
References: <CAFuo_fzP+bmfa_b_SxE1yKAbJ_15jS-EFmRzeB26tzZweyMSvQ@mail.gmail.com>
 <CAMtcK2pk+ZkG=Bx8GHHzyx7CDY3cshTSHokqkxq6FbcqFHcirQ@mail.gmail.com> <CAFuo_fyNZbi7q+1Sd9ffwfBCL_wcEncNH1DDd8VTuVy5uA2Z6Q@mail.gmail.com>
In-Reply-To: <CAFuo_fyNZbi7q+1Sd9ffwfBCL_wcEncNH1DDd8VTuVy5uA2Z6Q@mail.gmail.com>
From: Waitman Gobble <gobble.wa@gmail.com>
Date: Fri, 22 Dec 2023 21:41:54 -0400
Message-ID: <CAFuo_fzEwnsLHWG9CaAeJk80SDN8MZ9Jk6n6RH9CG+Up3t6AaA@mail.gmail.com>
Subject: Re: MariaDB startup issue
To: FreeBSD Questions List <questions@freebsd.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spamd-Result: default: False [-3.99 / 15.00];
	NEURAL_HAM_MEDIUM(-1.00)[-1.000];
	NEURAL_HAM_LONG(-1.00)[-1.000];
	NEURAL_HAM_SHORT(-0.99)[-0.995];
	DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
	R_SPF_ALLOW(-0.20)[+ip6:2001:4860:4000::/36:c];
	R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601];
	MIME_GOOD(-0.10)[text/plain];
	FROM_HAS_DN(0.00)[];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	FREEMAIL_FROM(0.00)[gmail.com];
	PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org];
	ARC_NA(0.00)[];
	RCPT_COUNT_ONE(0.00)[1];
	DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
	ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US];
	RCVD_IN_DNSWL_NONE(0.00)[2001:4860:4864:20::35:from];
	DKIM_TRACE(0.00)[gmail.com:+];
	TO_DN_ALL(0.00)[];
	MID_RHS_MATCH_FROMTLD(0.00)[];
	TAGGED_FROM(0.00)[];
	RCVD_COUNT_ONE(0.00)[1];
	RCVD_TLS_LAST(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	FREEMAIL_ENVFROM(0.00)[gmail.com];
	MIME_TRACE(0.00)[0:+];
	MLMMJ_DEST(0.00)[questions@freebsd.org]
X-Rspamd-Queue-Id: 4Sxn340Gn1z4vkk
X-Spamd-Bar: ---

On Fri, Dec 22, 2023 at 9:34=E2=80=AFPM Waitman Gobble <gobble.wa@gmail.com=
> wrote:
>
> On Fri, Dec 22, 2023 at 9:24=E2=80=AFPM paul beard <paulbeard@gmail.com> =
wrote:
> >
> > editing the RC script seems like the wrong answer. I have had this prob=
lem a few times. Does mysqld_safe run? The couple of issues I have had deal=
 with the pid file being where the RC script doesn't expect it so stop/star=
t/status don't work. Also, the ib* files in /var/db/mysql are often an issu=
e. The logs usually point them out.
> >
> > On Fri, Dec 22, 2023 at 5:13=E2=80=AFPM Waitman Gobble <gobble.wa@gmail=
.com> wrote:
> >>
> >> I upgraded a server from FreeBSD 13.2-RELEASE to FreeBSD 14.0-RELEASE
> >>
> >> During pkg upgrade it removed mariadb 10.4. I installed mariadb 10.6
> >> no biggie. Except I seem to be in a chicken and egg paradox. When I
> >> start the message is:
> >>
> >> Please merge existing /usr/local/etc/my.cnf file with
> >> /usr/local/etc/mysql/conf.d/server.cnf
> >>
> >> OK I did that. I renamed the file to /usr/local/etc/my.cnf.x
> >>
> >> service mysql-server start says it's starting but actually never
> >> starts the server. no error in the logs I can find. I'm obviously
> >> missing something?
> >>
> >> If I use the same command the rc script is executing (WITHOUT
> >> '/usr/sbin/daemon' that the rc script uses) I see the error finally!
> >>
> >> /usr/local/bin/mariadbd-safe
> >> --defaults-extra-file=3D/usr/local/etc/my.cnf --user=3Dmysql
> >> --datadir=3D/var/db/mysql --pid-file=3D/var/db/mysql/mysql.pid
> >> Could not open required defaults file: /usr/local/etc/my.cnf
> >> Fatal error in defaults handling. Program aborted
> >>
> >> OK so i made a blank /usr/local/etc/my.cnf and get this message:
> >>
> >> Please merge existing /usr/local/etc/my.cnf file with
> >> /usr/local/etc/mysql/conf.d/server.cnf
> >>
> >> So it's a loop. I guess I need to edit the rc script but i think i am
> >> missing something? Any ideas?
> >>
> >> TIA and HH
> >>
> >> --
> >> Waitman Gobble
> >> \\
> >>
> >
> >
> > --
> > Paul Beard / www.paulbeard.org/
>
> I agree it's the wrong answer. mysqld_safe runs no problem, the
> problem is the rc script bombs if the my.cnf exists but mysqld_safe
> seems like it won't start without it.
>
> But I read the documentation and the symlink method should work,
> because -f returns true on normal files (not symlinks) while -e
> returns true regardless. (the script uses -f)
> As long as mysqld_safe is cool with the symlink it should start!
> That's likely the best solution instead of editing the rc file. :)
>
> --
> Waitman Gobble
> //


Apparently -f also returns true on symlinks so i'll just sit down and shut =
up :)

Supposedly -f returns true on 'normal' files and '-e' returns true on
normal files and links. I guess.

# ls -lh my.cnf
lrwxr-xr-x  1 root wheel   11B Dec 22 21:36 my.cnf -> real-my.cnf


--=20
Waitman Gobble
//