I've done it before, maybe 4 years ago, for a past employer, so I can't say what FreeNAS version and configuration I had at the time, but I know at least it should be possible, but I can't for the life of me manage it today.
My current FreeNAS server at home, (with which I'm having the issues), is on version 11.1-U6. When I create a jail using the web interface, it used to say something about "11.0" in the progress box, but upon trying to get the actual message by creating a new jail, it doesn't appear to appear any more.
Within the jail, running `pkg install mysql57-server produces the following:
And stuff has already started to go wrong.
And
And
Giving that up as a bad cause, let's delete the jail and start over, following the instructions here instead. The instructions are fairly bare, and I'm presented with several prompts which I don't know the answers to. The first asks me which storage engines to statically compile into the server, of which none are selected, and I selected "INNOBASE" manually, and something to do with "features knobs", which I left alone.
It is at this point I was asked about storage engines and knobs.
At this point, I'm lost. I have no idea what file I'm patching. I'm also fairly disappointed that my system has fetched code to (presumably) compile and execute over PLAIN HTTP. (What the fuck).
Anyway, simply pressing Enter lets me skip patching, which then immediately falls over and dies.
So, let's delete the jail and try again - maybe Maria will be kinder to me. (Assuming you've read the thread title, the suspense is delightfully artificial for you).
Looking good so far.
And suddenly it looks much less promising. Let's check the logs it's talking about. They're in a weird place but whatever.
Ok cool, literally nothing but gibberish. What if we try running the server manually like the error message suggested?
Wonderful, the exact same bad cause as mysql itself had. Googling the error brings me to here, in which they discuss being on the wrong version of FreeBSD within the jail, and using iocage instead for jails, which I don't remember doing when I last set up MySQL.
Let's follow this guide to using ports for mariadb instead, starting with destroying and remaking a new clean jail.
At this point I'm getting pretty annoyed and exasperated. It seems like nobody but me is having these issues, and I don't feel like I'm doing anything strange.
Help please. :(
My current FreeNAS server at home, (with which I'm having the issues), is on version 11.1-U6. When I create a jail using the web interface, it used to say something about "11.0" in the progress box, but upon trying to get the actual message by creating a new jail, it doesn't appear to appear any more.
Within the jail, running `pkg install mysql57-server produces the following:
Code:
# pkg install mysql57-server Updating FreeBSD repository catalogue... pkg: Repository FreeBSD has a wrong packagesite, need to re-create database [mysql5] Fetching meta.txz: 100% 940 B 0.9kB/s 00:01 [mysql5] Fetching packagesite.txz: 100% 6 MiB 6.8MB/s 00:01 Processing entries: 100% FreeBSD repository update completed. 32478 packages processed. All repositories are up to date. New version of pkg detected; it needs to be installed first. The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: pkg: 1.10.1 -> 1.10.5_2 Number of packages to be upgraded: 1 3 MiB to be downloaded. Proceed with this action? [y/N]: y [mysql5] [1/1] Fetching pkg-1.10.5_2.txz: 100% 3 MiB 3.0MB/s 00:01 Checking integrity... done (0 conflicting) [mysql5] [1/1] Upgrading pkg from 1.10.1 to 1.10.5_2... [mysql5] Extracting pkg-1.10.5_2: 100% You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed. Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 7 package(s) will be affected (of 0 checked): New packages to be INSTALLED: mysql57-server: 5.7.23_1 liblz4: 1.8.2,1 protobuf: 3.5.2_1,1 libevent: 2.1.8_1 libedit: 3.1.20170329_2,1 mysql57-client: 5.7.23 cyrus-sasl: 2.1.26_13 Number of packages to be installed: 7 The process will require 212 MiB more space. 19 MiB to be downloaded. Proceed with this action? [y/N]: y [mysql5] [1/7] Fetching mysql57-server-5.7.23_1.txz: 100% 14 MiB 7.1MB/s 00:02 [mysql5] [2/7] Fetching liblz4-1.8.2,1.txz: 100% 114 KiB 116.9kB/s 00:01 [mysql5] [3/7] Fetching protobuf-3.5.2_1,1.txz: 100% 2 MiB 2.5MB/s 00:01 [mysql5] [4/7] Fetching libevent-2.1.8_1.txz: 100% 304 KiB 311.7kB/s 00:01 [mysql5] [5/7] Fetching libedit-3.1.20170329_2,1.txz: 100% 126 KiB 128.5kB/s 00:01 [mysql5] [6/7] Fetching mysql57-client-5.7.23.txz: 100% 2 MiB 1.9MB/s 00:01 [mysql5] [7/7] Fetching cyrus-sasl-2.1.26_13.txz: 100% 474 KiB 485.6kB/s 00:01 Checking integrity... done (0 conflicting) [mysql5] [1/7] Installing liblz4-1.8.2,1... [mysql5] [1/7] Extracting liblz4-1.8.2,1: 100% [mysql5] [2/7] Installing protobuf-3.5.2_1,1... [mysql5] [2/7] Extracting protobuf-3.5.2_1,1: 100% [mysql5] [3/7] Installing libevent-2.1.8_1... [mysql5] [3/7] Extracting libevent-2.1.8_1: 100% [mysql5] [4/7] Installing libedit-3.1.20170329_2,1... [mysql5] [4/7] Extracting libedit-3.1.20170329_2,1: 100% [mysql5] [5/7] Installing cyrus-sasl-2.1.26_13... *** Added group `cyrus' (id 60) *** Added user `cyrus' (id 60) [mysql5] [5/7] Extracting cyrus-sasl-2.1.26_13: 100% [mysql5] [6/7] Installing mysql57-client-5.7.23... [mysql5] [6/7] Extracting mysql57-client-5.7.23: 100% [mysql5] [7/7] Installing mysql57-server-5.7.23_1... ===> Creating groups. Creating group 'mysql' with gid '88'. ===> Creating users Creating user 'mysql' with uid '88'. [mysql5] [7/7] Extracting mysql57-server-5.7.23_1: 100% Message from cyrus-sasl-2.1.26_13: You can use sasldb2 for authentication, to add users use: saslpasswd2 -c username If you want to enable SMTP AUTH with the system Sendmail, read Sendmail.README NOTE: This port has been compiled with a default pwcheck_method of auxprop. If you want to authenticate your user by /etc/passwd, PAM or LDAP, install ports/security/cyrus-sasl2-saslauthd and set sasl_pwcheck_method to saslauthd after installing the Cyrus-IMAPd 2.X port. You should also check the /usr/local/lib/sasl2/*.conf files for the correct pwcheck_method. If you want to use GSSAPI mechanism, install ports/security/cyrus-sasl2-gssapi. If you want to use SRP mechanism, install ports/security/cyrus-sasl2-srp. If you want to use LDAP auxprop plugin, install ports/security/cyrus-sasl2-ldapdb. Message from mysql57-client-5.7.23: * * * * * * * * * * * * * * * * * * * * * * * * This is the mysql CLIENT without the server. for complete server and client, please install databases/mysql57-server * * * * * * * * * * * * * * * * * * * * * * * * Message from mysql57-server-5.7.23_1: ***************************************************************************** Remember to run mysql_upgrade the first time you start the MySQL server after an upgrade from an earlier version. Initial password for first time use of MySQL is saved in $HOME/.mysql_secret ie. when you want to use "mysql -u root -p" first you should see password in /root/.mysql_secret MySQL57 has a default %%ETCDIR%%/my.cnf, remember to replace it wit your own or set `mysql_optfile="$YOUR_CNF_FILE` in rc.conf. *****************************************************************************
And stuff has already started to go wrong.
Code:
[root@mysql5 /]# cat /root/.mysql_secret cat: /root/.mysql_secret: No such file or directory
And
Code:
[root@mysql5 /]# service mysql-server onestart /usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
And
Code:
[root@mysql5 /]# /usr/local/libexec/mysqld 2018-08-26T00:29:54.020858Z 0 [Note] /usr/local/libexec/mysqld (mysqld 5.7.23-log) starting as process 24570 ... /usr/local/libexec/mysqld: Undefined symbol "fdatasync"
Giving that up as a bad cause, let's delete the jail and start over, following the instructions here instead. The instructions are fairly bare, and I'm presented with several prompts which I don't know the answers to. The first asks me which storage engines to statically compile into the server, of which none are selected, and I selected "INNOBASE" manually, and something to do with "features knobs", which I left alone.
Code:
# cd /usr/ports/databases/mysql57-server # make ===> Building/installing dialog4ports as it is required for the config dialog ===> Cleaning for dialog4ports-0.1.6 ===> Skipping 'config' as NO_DIALOG is defined ===> License BSD2CLAUSE accepted by the user ===> dialog4ports-0.1.6 depends on file: /usr/local/sbin/pkg - found => dialog4ports-0.1.6.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch http://m1cro.me/dialog4ports/dialog4ports-0.1.6.tar.gz dialog4ports-0.1.6.tar.gz 100% of 10 kB 67 kBps 00m00s ===> Fetching all distfiles required by dialog4ports-0.1.6 for building ===> Extracting for dialog4ports-0.1.6 => SHA256 Checksum OK for dialog4ports-0.1.6.tar.gz. ===> Patching for dialog4ports-0.1.6 ===> Configuring for dialog4ports-0.1.6 ===> Building for dialog4ports-0.1.6 --- dialog4ports.o --- --- mixedlist.o --- --- dialog4ports.o --- cc -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -pedantic -c dialog4ports.c -o dialog4ports.o --- mixedlist.o --- cc -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -pedantic -c mixedlist.c -o mixedlist.o --- dialog4ports.1.gz --- gzip -cn dialog4ports.1 > dialog4ports.1.gz --- dialog4ports --- cc -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -pedantic dialog4ports.o mixedlist.o -o dialog4ports -lncursesw -lm -ldialog ===> Staging for dialog4ports-0.1.6 ===> Generating temporary packing list install -s -m 555 dialog4ports /usr/ports/ports-mgmt/dialog4ports/work/stage/usr/local/bin install -m 0644 dialog4ports.1.gz /usr/ports/ports-mgmt/dialog4ports/work/stage/usr/local/man/man1 ====> Compressing man pages (compress-man) ===> Installing for dialog4ports-0.1.6 ===> Checking if dialog4ports already installed ===> Registering installation for dialog4ports-0.1.6 [mysql5] Installing dialog4ports-0.1.6... ===> Cleaning for dialog4ports-0.1.6
It is at this point I was asked about storage engines and knobs.
Code:
===> License GPLv2 accepted by the user ===> mysql57-server-5.7.18 depends on file: /usr/local/sbin/pkg - found => mysql-boost-5.7.18.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch ftp://ftp.fi.muni.cz/pub/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://ftp.fi.muni.cz/pub/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: File unavailable (e.g., file not found, no access) => Attempting to fetch http://mysql.mirrors.cybercity.dk/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: http://mysql.mirrors.cybercity.dk/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: Operation timed out => Attempting to fetch ftp://ftp.fh-wolfenbuettel.de/pub/database/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://ftp.fh-wolfenbuettel.de/pub/database/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: Operation timed out => Attempting to fetch ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: File unavailable (e.g., file not found, no access) => Attempting to fetch http://netmirror.org/mirror/mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: http://netmirror.org/mirror/mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: Not Found => Attempting to fetch ftp://netmirror.org/mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://netmirror.org/mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: Operation timed out => Attempting to fetch http://mirrors.ntua.gr/MySQL/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: http://mirrors.ntua.gr/MySQL/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: Not Found => Attempting to fetch ftp://ftp.ntua.gr/pub/databases/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://ftp.ntua.gr/pub/databases/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: File unavailable (e.g., file not found, no access) => Attempting to fetch http://mysql.sote.hu/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: http://mysql.sote.hu/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: No address record => Attempting to fetch ftp://ftp.rhnet.is/pub/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://ftp.rhnet.is/pub/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: No address record => Attempting to fetch ftp://mirror.widexs.nl/pub/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://mirror.widexs.nl/pub/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: File unavailable (e.g., file not found, no access) => Attempting to fetch ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: File unavailable (e.g., file not found, no access) => Attempting to fetch http://mysql.dp.ua/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: http://mysql.dp.ua/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: No address record => Attempting to fetch http://mysql.mirrored.ca/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: http://mysql.mirrored.ca/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: size unknown fetch: http://mysql.mirrored.ca/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: size of remote file is not known mysql-boost-5.7.18.tar.gz 3936 B 32 kBps 00m01s => Fetched file size mismatch (expected 61612105, actual 3936) => Trying next site => Attempting to fetch ftp://mirror.services.wisc.edu/mirrors/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz fetch: ftp://mirror.services.wisc.edu/mirrors/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz: No address record => Attempting to fetch http://mysql.mirrors.pair.com/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz mysql-boost-5.7.18.tar.gz 100% of 58 MB 4815 kBps 00m12s ===> Fetching all distfiles required by mysql57-server-5.7.18 for building ===> Extracting for mysql57-server-5.7.18 => SHA256 Checksum OK for mysql-boost-5.7.18.tar.gz. /usr/ports/databases/mysql57-server/work/mysql-5.7.18/sql/sql_hints.yy.cc /usr/ports/databases/mysql57-server/work/mysql-5.7.18/sql/sql_hints.yy.h ===> Patching for mysql57-server-5.7.18 ===> Applying FreeBSD patches for mysql57-server-5.7.18 File to patch:
At this point, I'm lost. I have no idea what file I'm patching. I'm also fairly disappointed that my system has fetched code to (presumably) compile and execute over PLAIN HTTP. (What the fuck).
Anyway, simply pressing Enter lets me skip patching, which then immediately falls over and dies.
Code:
File to patch: No file found--skip this patch? [n] y 1 out of 1 hunks ignored--saving rejects to Oops.rej => FreeBSD patch patch-rapid_plugin_x_mysqlx__error.cmake failed to apply cleanly. => Patch(es) patch-CMakeLists.txt patch-client_CMakeLists.txt patch-cmake_plugin.cmake patch-cmake_ssl.cmake patch-cmd-line-utils_libedit_chartype.h patch-cmd-line-utils_libedit_vi.c patch-include_CMakeLists.txt patch-include_my__compare.h patch-include_my__thread__os__id.h patch-include_myisam.h patch-libmysql_CMakeLists.txt patch-libservices_CMakeLists.txt patch-man_CMakeLists.txt patch-mysys__ssl_my__default.cc patch-plugin_password__validation_validate__password.cc patch-rapid_plugin_x_CMakeLists.txt patch-rapid_plugin_x_mysqlx__configure.cmake applied cleanly. *** Error code 1 Stop. make[1]: stopped in /usr/ports/databases/mysql57-server *** Error code 1 Stop. make: stopped in /usr/ports/databases/mysql57-server #
So, let's delete the jail and try again - maybe Maria will be kinder to me. (Assuming you've read the thread title, the suspense is delightfully artificial for you).
Code:
[asday@freenas ~]$ sudo jexec mysql5 sh Password:hunter2 # pkg install mariadb103-server Updating FreeBSD repository catalogue... pkg: Repository FreeBSD has a wrong packagesite, need to re-create database [mysql5] Fetching meta.txz: 100% 940 B 0.9kB/s 00:01 [mysql5] Fetching packagesite.txz: 100% 6 MiB 6.8MB/s 00:01 Processing entries: 100% FreeBSD repository update completed. 32478 packages processed. All repositories are up to date. New version of pkg detected; it needs to be installed first. The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: pkg: 1.10.1 -> 1.10.5_2 Number of packages to be upgraded: 1 3 MiB to be downloaded. Proceed with this action? [y/N]: y [mysql5] [1/1] Fetching pkg-1.10.5_2.txz: 100% 3 MiB 3.0MB/s 00:01 Checking integrity... done (0 conflicting) [mysql5] [1/1] Upgrading pkg from 1.10.1 to 1.10.5_2... [mysql5] Extracting pkg-1.10.5_2: 100% You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed. Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 6 package(s) will be affected (of 0 checked): New packages to be INSTALLED: mariadb103-server: 10.3.8_2 libxml2: 2.9.7 libedit: 3.1.20170329_2,1 unixODBC: 2.3.7 mariadb103-client: 10.3.8 libiconv: 1.14_11 Number of packages to be installed: 6 The process will require 240 MiB more space. 32 MiB to be downloaded. Proceed with this action? [y/N]: y [mysql5] [1/6] Fetching mariadb103-server-10.3.8_2.txz: 100% 28 MiB 7.5MB/s 00:04 [mysql5] [2/6] Fetching libxml2-2.9.7.txz: 100% 818 KiB 837.7kB/s 00:01 [mysql5] [3/6] Fetching libedit-3.1.20170329_2,1.txz: 100% 126 KiB 128.5kB/s 00:01 [mysql5] [4/6] Fetching unixODBC-2.3.7.txz: 100% 455 KiB 466.4kB/s 00:01 [mysql5] [5/6] Fetching mariadb103-client-10.3.8.txz: 100% 2 MiB 2.0MB/s 00:01 [mysql5] [6/6] Fetching libiconv-1.14_11.txz: 100% 603 KiB 617.7kB/s 00:01 Checking integrity... done (0 conflicting) [mysql5] [1/6] Installing libedit-3.1.20170329_2,1... [mysql5] [1/6] Extracting libedit-3.1.20170329_2,1: 100% [mysql5] [2/6] Installing libiconv-1.14_11... [mysql5] [2/6] Extracting libiconv-1.14_11: 100% [mysql5] [3/6] Installing libxml2-2.9.7... [mysql5] [3/6] Extracting libxml2-2.9.7: 100% [mysql5] [4/6] Installing unixODBC-2.3.7... [mysql5] [4/6] Extracting unixODBC-2.3.7: 100% [mysql5] [5/6] Installing mariadb103-client-10.3.8... [mysql5] [5/6] Extracting mariadb103-client-10.3.8: 100% [mysql5] [6/6] Installing mariadb103-server-10.3.8_2... ===> Creating groups. Creating group 'mysql' with gid '88'. ===> Creating users Creating user 'mysql' with uid '88'. [mysql5] [6/6] Extracting mariadb103-server-10.3.8_2: 100% Message from mariadb103-client-10.3.8: ************************************************************************ MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for my.cnf. Please move existing my.cnf files from those paths to /usr/local/etc and /usr/local/etc/mysql. ************************************************************************ Message from mariadb103-server-10.3.8_2: ************************************************************************ Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag) the first time you start the MySQL server after an upgrade from an earlier version. MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for my.cnf. Please move existing my.cnf files from those paths to /usr/local/etc and /usr/local/etc/mysql. This port does NOT include the mytop perl script, this is included in the MariaDB tarball but the most recent version can be found in the databases/mytop port ************************************************************************ #
Looking good so far.
Code:
# service mysql-server onestart Installing MariaDB/MySQL system tables in '/var/db/mysql' ... /usr/local/libexec/mysqld: Undefined symbol "fdatasync" 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 #
And suddenly it looks much less promising. Let's check the logs it's talking about. They're in a weird place but whatever.
Code:
# ls -lash /var/db/mysql total 36 1 drwxr-xr-x 3 mysql mysql 4B Aug 26 01:55 . 33 drwxr-xr-x 14 root wheel 17B Aug 26 01:54 .. 1 -rw-rw---- 1 root mysql 52B Aug 26 01:55 aria_log_control 1 drwx------ 2 root mysql 2B Aug 26 01:55 mysql # ls /var/db/mysql/ # tail /var/db/mysql/aria_log_control �� �qH��蛯r�*�.z "�W�M�g# file /var/db/mysql/aria_log_control /var/db/mysql/aria_log_control: data #
Ok cool, literally nothing but gibberish. What if we try running the server manually like the error message suggested?
Code:
# /usr/local/libexec/mysqld --skip-grant-tables --general-log 2018-08-26 2:02:56 0 [Note] /usr/local/libexec/mysqld (mysqld 10.3.8-MariaDB-log) starting as process 44394 ... /usr/local/libexec/mysqld: Please consult the Knowledge Base to find out how to run mysqld as root! 2018-08-26 2:02:56 0 [ERROR] Aborting # su mysql -c "/usr/local/libexec/mysqld --skip-grant-tables --general-log" This account is currently not available. # sudo -u mysql /usr/local/libexec/mysqld --skip-grant-tables --general-log sh: sudo: not found # chpass -s /bin/sh mysql chpass: user information updated # su - mysql $ /usr/local/libexec/mysqld --skip-grant-tables --general-log 2018-08-26 2:15:29 0 [Note] /usr/local/libexec/mysqld (mysqld 10.3.8-MariaDB-log) starting as process 45661 ... /usr/local/libexec/mysqld: Undefined symbol "fdatasync" $
Wonderful, the exact same bad cause as mysql itself had. Googling the error brings me to here, in which they discuss being on the wrong version of FreeBSD within the jail, and using iocage instead for jails, which I don't remember doing when I last set up MySQL.
Let's follow this guide to using ports for mariadb instead, starting with destroying and remaking a new clean jail.
Code:
# portsnap fetch update && portupgrade -a Some complaint about needing to run "extract" before "update". No idea what it actually was because the next line completely trashed my buffer. # portsnap extract Literally thousands of lines of "/usr/ports/..." ... /usr/ports/x11/yalias/ /usr/ports/x11/yeahconsole/ /usr/ports/x11/yelp/ /usr/ports/x11/zenity/ Building new INDEX files... done. # portsnap update Ports tree is already up to date. # portupgrade -a sh: portupgrade: not found # cd /usr/ports/databases/mariadb103-server # make install clean Some complaint about my system being out of date and unsupported. I needed to define an environment variable to continue. Again, I can't copy paste it because my buffer was trashed later. # ALLOW_UNSUPPORTED_SYSTEMS=yes make install clean Several configuration screens which I left with default options enabled, followed by thousands of lines of C compilation output, then: ====> Compressing man pages (compress-man) ===> Installing for gettext-tools-0.19.8.1 ===> Checking if gettext-tools already installed ===> Registering installation for gettext-tools-0.19.8.1 as automatic [mysql5] Installing gettext-tools-0.19.8.1... ===> p5-Locale-gettext-1.07 depends on executable: msgfmt - found ===> Returning to build of p5-Locale-gettext-1.07 ===> p5-Locale-gettext-1.07 depends on package: perl5>=5.24<5.25 - found ===> p5-Locale-gettext-1.07 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so) ===> Configuring for p5-Locale-gettext-1.07 env: /usr/local/bin/perl5.24.4: No such file or directory *** Error code 127 Stop. make[10]: stopped in /usr/ports/devel/p5-Locale-gettext *** Error code 1 Stop. make[9]: stopped in /usr/ports/misc/help2man *** Error code 1 Stop. make[8]: stopped in /usr/ports/misc/help2man *** Error code 1 Stop. make[7]: stopped in /usr/ports/print/texinfo *** Error code 1 Stop. make[6]: stopped in /usr/ports/print/texinfo *** Error code 1 Stop. make[5]: stopped in /usr/ports/devel/m4 *** Error code 1 Stop. make[4]: stopped in /usr/ports/devel/m4 *** Error code 1 Stop. make[3]: stopped in /usr/ports/devel/bison *** Error code 1 Stop. make[2]: stopped in /usr/ports/devel/bison *** Error code 1 Stop. make[1]: stopped in /usr/ports/databases/mariadb103-server *** Error code 1 Stop. make: stopped in /usr/ports/databases/mariadb103-server #
At this point I'm getting pretty annoyed and exasperated. It seems like nobody but me is having these issues, and I don't feel like I'm doing anything strange.
Help please. :(