Re: MariaDB startup issue

From: Waitman Gobble <gobble.wa_at_gmail.com>
Date: Sat, 23 Dec 2023 01:22:05 UTC
On Fri, Dec 22, 2023 at 9:18 PM Paul Procacci <pprocacci@gmail.com> wrote:
>
>
>
> On Fri, Dec 22, 2023 at 8:13 PM 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=/usr/local/etc/my.cnf --user=mysql
>> --datadir=/var/db/mysql --pid-file=/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
>> \\
>>
>
> Try a symlink that takes /usr/local/etc/my.cnf and points it to /usr/local/etc/mysql/conf.d/server.cnf
>
> ~Paul
>
> --
> __________________
>
> :(){ :|:& };:

oh, will that satisfy the -f check in the rc file? (ie it won't start
if the file exists). I'm not sure if that will ignore symlinks but i
will check it out.

mysql_prestart()
{
        local dir
        for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do
                if [ -f "${dir}/my.cnf" ]; then
                        echo "Please merge existing ${dir}/my.cnf file
with /usr/local/etc/mysql/conf.d/server.cnf"
#                       return 1
                fi
        done

commenting out return 1 solves it for me. starts and runs just fine.

But i'm sure other people are using it and upgraded. So I obviously
missed a note or something.



-- 
Waitman Gobble
\\