OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: tortellini on April 12, 2021, 03:51:22 PM

Title: Installing MariaDB/MySQL system tables in '/var/db/mysql' fails
Post by: tortellini on April 12, 2021, 03:51:22 PM
Hi Community,

I recently installed (from scratch) 21.1. Then upgraded to 21.1.4.
I then allow to install from FreeBSD repos [/usr/local/etc/pkg/repos/FreeBSD.conf, changed to yes].
I then installed mariadb105-server.

When trying to run the server, it fails.

I tried the following to troubleshoot:
1. Uninstall and re-install 10.5
2. Uninstall and installed prior versions 10.4 and 10.3
3. pkg-static upgrade -f
4. Ran all commands as suggested in the error msg
5. Check internet and only two websites talking about memalign@FBSD_1.6 and might be related to conflicts in lib? No idea.

Appreciate the help.

Note: I've been using Opnsense for the last 5 years on the same hardware Zotac CI321 with no issues with install from FreeBSD repo.

Below is msg.

-------------------

service mysql-server onestart

Installing MariaDB/MySQL system tables in '/var/db/mysql' ...
ld-elf.so.1: /usr/local/libexec/mysqld: Undefined symbol "memalign@FBSD_1.6"
cat: stdout: Broken pipe
cat: stdout: Broken pipe
cat: stdout: Broken pipe

Installation of system tables failed!  Examine the logs in
/var/db/mysql for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

    shell> /usr/local/bin/mysql_install_db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

    shell> /usr/local/libexec/mysqld --skip-grant-tables --general-log &

and use the command line tool /usr/local/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/local/bin/mysql -u root mysql
    mysql> show tables;

Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/db/mysql that may be helpful.

The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at http://mariadb.org/jira

/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql

-------------------
Title: Re: Installing MariaDB/MySQL system tables in '/var/db/mysql' fails
Post by: tortellini on April 12, 2021, 05:35:06 PM
I figured out the issue.

FreeBSD 12.1 is end-of-life.  I had to change the FreeBSD.conf to the following:

FreeBSD: {
  url: "pkg+http://pkg.freebsd.org/FreeBSD:12:amd64/release_1",
  enabled: yes
}

And then did pkg update, pkg upgrade, removed mariadb105-server, installed mariadb103-server.


Installed packages to be DOWNGRADED:
        bash: 5.1.4_1 -> 5.0.11 [FreeBSD]
        icu: 68.2,1 -> 64.2,1 [FreeBSD]
        rsync: 3.2.3 -> 3.1.3_1 [FreeBSD]
        xxhash: 0.8.0 -> 0.7.1 [FreeBSD]
        zstd: 1.4.8 -> 1.4.3 [FreeBSD]

Mariadb103 is latest for 12.1 release.

Maybe OpnSense can put this as a check?

THanks