Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Dec 2023 21:41:54 -0400
From:      Waitman Gobble <gobble.wa@gmail.com>
To:        FreeBSD Questions List <questions@freebsd.org>
Subject:   Re: MariaDB startup issue
Message-ID:  <CAFuo_fzEwnsLHWG9CaAeJk80SDN8MZ9Jk6n6RH9CG%2BUp3t6AaA@mail.gmail.com>
In-Reply-To: <CAFuo_fyNZbi7q%2B1Sd9ffwfBCL_wcEncNH1DDd8VTuVy5uA2Z6Q@mail.gmail.com>
References:  <CAFuo_fzP%2Bbmfa_b_SxE1yKAbJ_15jS-EFmRzeB26tzZweyMSvQ@mail.gmail.com> <CAMtcK2pk%2BZkG=Bx8GHHzyx7CDY3cshTSHokqkxq6FbcqFHcirQ@mail.gmail.com> <CAFuo_fyNZbi7q%2B1Sd9ffwfBCL_wcEncNH1DDd8VTuVy5uA2Z6Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
//



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFuo_fzEwnsLHWG9CaAeJk80SDN8MZ9Jk6n6RH9CG%2BUp3t6AaA>