Solved FreeBSD 13.0-RELEASE (MariaDB Jail) - Broke it by accident setting "max_packet_size" Variable... Help!

Hey everyone!

I'm in a pickle this evening after getting my mail server setup nicely. I was trying to increase "max_packet_size" from default: 16777216 to 26214400

This is how I accidently broke my Maria DB 10.5.x (Inside a Jail):

Code:
root@jail:~ # mysql -h mariadbserver_ip -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 232822
Server version: 10.5.15-MariaDB FreeBSD Ports

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@mariadbserver_ip [(none)]> show variables like 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+
1 row in set (0.001 sec)

root@mariadbserver_ip [(none)]> SET GLOBAL max_allowed_packet="26214400";
ERROR 1232 (42000): Incorrect argument type to variable 'max_allowed_packet'
root@mariadbserver_ip [(none)]> SET GLOBAL --max-allowed-packet=26214400;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '--max-allowed-packet=26214400' at line 1
root@mariadbserver_ip [(none)]> --max-allowed-packet=26214400;
root@mariadbserver_ip [(none)]> show variables like 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+
1 row in set (0.002 sec)

root@mariadbserver_ip [(none)]> --max-allowed-packet=26214400
root@mariadbserver_ip [(none)]> show variables like 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+
1 row in set (0.001 sec)

root@mariadbserver_ip [(none)]> set global max_allowed_packet=26214400 max_allowed_packet;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'max_allowed_packet' at line 1
root@mariadbserver_ip [(none)]> set global max_allowed_packet=26214400;
Query OK, 0 rows affected (0.009 sec)

root@mariadbserver_ip [(none)]>

If this wasn't bad enough; I added 1 line to /usr/local/etc/mysql/my.cnf which looks like:

Before 1 Line Add:
Code:
#
# This group is read both by the client and the server
# use it for options that affect everything, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#option-groups
#
[client-server]
port    = 3306
socket  = /var/run/mysql/mysql.sock

#
# include *.cnf from the config directory
#
!includedir /usr/local/etc/mysql/conf.d/

After 1 Line Add:
Code:
#
# This group is read both by the client and the server
# use it for options that affect everything, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#option-groups
#
[client-server]
port    = 3306
socket  = /var/run/mysql/mysql.sock
max_packet_size = 26214400

#
# include *.cnf from the config directory
#
!includedir /usr/local/etc/mysql/conf.d/

I then went to restart my MariaDB server with:

Code:
# service mysql-server restart

This was my moment of Doom!

*Dark and Ominous Music Plays*... lol

This is my error message:

Code:
Please merge existing /usr/local/etc/my.cnf file with /usr/local/etc/mysql/conf.d/server.cnf
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql

I tried two ways to "merge" the files. my.cnf and conf.d/server.cnf:
1) Copy the 3 lines used in my.cnf to conf.d/server.cnf (Where they are # commented out due to the my.cnf entries), this includes the !include line for /conf.d/*
2) Copied server.cnf to my.cnf


This is the contents of /usr/local/etc/mysql/conf.d/server.cnf:


Code:
# Options specific to server applications, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#server-option-groups

# Options specific to all server programs
[server]

# Options specific to MariaDB server programs
[server-mariadb]

#
# Options for specific server tools
#

[mysqld]
user                            = mysql
# port                          = 3306 # inherited from /usr/local/etc/mysql/my.cnf
# socket                        = /var/run/mysql/mysql.sock # inherited from /usr/local/etc/mysql/my.cnf
#bind-address                   = 127.0.0.1
#bind-address                    = 0.0.0.0
bind-address                    = mariadbserverip
basedir                         = /usr/local
datadir                         = /var/db/mysql
net_retry_count                 = 16384
log_error                       = /var/log/mysql/mysqld.err
# [mysqld] configuration for ZFS
# From https://www.percona.com/resources/technical-presentations/zfs-mysql-percona-technical-webinar
# Create separate datasets for data and logs, eg
# zroot/mysql      compression=on recordsize=128k atime=off
# zroot/mysql/data recordsize=16k
# zroot/mysql/data recordsize=16k
# zroot/mysql/logs
# datadir                       = /var/db/mysql/data
# innodb_log_group_home_dir     = /var/db/mysql/log
# audit_log_file                = /var/db/mysql/log/audit.log
# general_log_file              = /var/db/mysql/log/general.log
# log_bin                       = /var/db/mysql/log/mysql-bin
# relay_log                     = /var/db/mysql/log/relay-log
# slow_query_log_file           = /var/db/mysql/log/slow.log
# innodb_doublewrite            = 0
# innodb_flush_method           = O_DSYNC

# Options read by `mysqld_safe`
# Renamed from [mysqld_safe] starting with MariaDB 10.4.6.
[mariadb_safe]

# Options read my `mariabackup`
[mariabackup]

# Options read by `mysql_upgrade`
# Renamed from [mysql_upgrade] starting with MariaDB 10.4.6.
[mariadb-upgrade]

# Specific options read by the mariabackup SST method
[sst]

# Options read by `mysqlbinlog`
# Renamed from [mysqlbinlog] starting with MariaDB 10.4.6.
[mariadb-binlog]

# Options read by `mysqladmin`
# Renamed from [mysqladmin] starting with MariaDB 10.4.6.
[mariadb-admin]


Restarted and the same error!
Using tail on the the /var/log/mysql/mysqld.err reveals:

Code:
root@mariadb:/usr/local/etc/mysql/conf.d # cd /var/log/mysql
root@mariadb:/var/log/mysql # ls -l
total 537
-rw-rw----  1 mysql  mysql  5243934 May  2 01:50 mysqld.err
root@mariadb:/var/log/mysql # tail mysqld.err
2022-05-02  1:49:59 0 [Note] Event Scheduler: Purging the queue. 0 events
2022-05-02  1:49:59 0 [Note] InnoDB: FTS optimize thread exiting.
2022-05-02  1:50:01 0 [Note] InnoDB: Starting shutdown...
2022-05-02  1:50:01 0 [Note] InnoDB: Dumping buffer pool(s) to /var/db/mysql/ib_buffer_pool
2022-05-02  1:50:01 0 [Note] InnoDB: Restricted to 2016 pages due to innodb_buf_pool_dump_pct=25
2022-05-02  1:50:01 0 [Note] InnoDB: Buffer pool(s) dump completed at 220502  1:50:01
2022-05-02  1:50:25 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-05-02  1:50:25 0 [Note] InnoDB: Shutdown completed; log sequence number 724778545770; transaction id 118829080
2022-05-02  1:50:25 0 [Note] /usr/local/libexec/mariadbd: Shutdown complete

root@mariadb:/var/log/mysql #

I have since put it exactly back to where it was (the files) with a broken MariaDB 10.5 Server and all my SQL Data is in Jeopardy!

If Anyone has any idea how to fix this without losing MySQL/MariaDB Data (I have hundreds of databases inside); I would really appreciate it! Thank you everyone, as always, For FreeBSD, This Community and All Assistance, Learning Assistance!

Best Regards,
Brandon!
 
"Restarted and the same error" - what error?

The tail command is showing it shutting down - there's no error in there that I can see?

First recommendation is to stop running around changing configuration files - slow down before you make it any worse.
 
"Restarted and the same error" - what error?

The tail command is showing it shutting down - there's no error in there that I can see?

First recommendation is to stop running around changing configuration files - slow down before you make it any worse.
richardtoohey2,

Good to see ya! Yes I stopped changing things and tried to present the situation with all the facts as neatly as possible.

When I do: (This is the error): When trying to start mysql-server after the restart failed.

Code:
root@mariadbjail:~ # service mysql-server start
Please merge existing /usr/local/etc/my.cnf file with /usr/local/etc/mysql/conf.d/server.cnf
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
root@mariadbjail:~ # service mysql-server status
mysql is not running.
root@mariadbjail:~ #

Best Regards,

Brandon
 
So before all this, did you have two config files?

And now you are back to two config files? And you think they are as they were before you started changing them?

And you've removed the line that you think caused the trouble?
 
So before all this, did you have two config files?

And now you are back to two config files? And you think they are as they were before you started changing them?

And you've removed the line that you think caused the trouble?
richardtoohey2,

Yes, exactly. I had two files before I had that root session with CLI MariaDB 10.5.x in my MySQL Jail:

1) /usr/local/etc/mysql/my.cnf (which has port and socket lines + !include line)

2) /usr/local/etc/mysql/conf.d/server.cnf (which had all the rest)

The extra line I added; I have since removed. Yup!

Best Regards,

Brandon
 
Searching for "WARNING: failed precmd routine for mysql" seems to suggest a broken data directory or permissions issue, so really don't think it's anything to do with your max allowed packets tweaking as such.

I think you've attempted to merge the configuration files and maybe pointed mariadb to the wrong place for its data, and re-started mariadb pointing to the wrong directory and maybe in doing that you've mangled something (or you've not restored what you had previously so it's still looking in the wrong place).

Check /var/db/mysql and see if your database files are still there, and what permissions are in place.

If you've got a lot of important stuff on there at this point I'd STOP on your important machine and start making a test machine, copy everything in /var/db/mysql across to there, and see if you can get a fresh install of mariadb to accept your database files.

Are you sure you didn't do any other changes or upgrades or anything like that? You might have done something else and when you did the restart it also picked up other changes or newer binaries?
 
I might be barking up the wrong tree, but if you look in /usr/local/etc/rc.d/mysql-server:

Code:
start_precmd="${name}_prestart"
...
mysql_prestart()
{
        if [ ! -d "${mysql_dbdir}/mysql/." ]; then
                mysql_create_auth_tables || return 1
        fi  
        return 0
}

I think that's what the "precmd" message is referring to - that mysql_prestart has failed, and it doesn't like something to with your data directory.

Good luck!
 
Searching for "WARNING: failed precmd routine for mysql" seems to suggest a broken data directory or permissions issue, so really don't think it's anything to do with your max allowed packets tweaking as such.

I think you've attempted to merge the configuration files and maybe pointed mariadb to the wrong place for its data, and re-started mariadb pointing to the wrong directory and maybe in doing that you've mangled something (or you've not restored what you had previously so it's still looking in the wrong place).

Check /var/db/mysql and see if your database files are still there, and what permissions are in place.

If you've got a lot of important stuff on there at this point I'd STOP on your important machine and start making a test machine, copy everything in /var/db/mysql across to there, and see if you can get a fresh install of mariadb to accept your database files.

Are you sure you didn't do any other changes or upgrades or anything like that? You might have done something else and when you did the restart it also picked up other changes or newer binaries?
richardtoohey2,

I have looked in /var/db/mysql now; and all my databases are shown with the following permissions:

Code:
100+ databases and then:

-rw-rw----  1 mysql  mysql   20226048 May  2 01:50 aria_log.00000001
-rw-rw----  1 mysql  mysql         52 May  2 01:50 aria_log_control
drwx------  2 mysql  mysql        337 Dec  8  2020 devtest1
drwx------  2 mysql  mysql        203 Aug 28  2020 devtest2
drwx------  2 mysql  mysql          3 Aug 20  2020 devtest3
-rw-r-----  1 mysql  mysql      19435 May  2 01:50 ib_buffer_pool
-rw-rw----  1 mysql  mysql  100663296 May  2 01:50 ib_logfile0
-rw-rw----  1 mysql  mysql  146800640 May  2 01:50 ibdata1
-rw-------  1 mysql  mysql  555089920 Apr  6 02:36 mariadbd.core
-rw-rw----  1 mysql  mysql          0 Jul 18  2020 multi-master.info
drwx------  2 mysql  mysql         90 Jul 18  2020 mysql
drwx------  2 mysql  mysql          3 Jul 18  2020 performance_schema
drwx------  2 mysql  mysql          3 Jul 23  2020 phpmyadmin

root@mariadbjail:/var/db/mysql #

I don't recall any other changes than what I shared. I took the entire shell and pasted it in.

I made an ezjail-admin archive backup of the broken one and I have one from earlier last month's backups. (I do have really important stuff on here; updates, studies, etc.)

I will start building a new MariaDB Jail right away! I appreciate your assistance.

Best Regards,

Brandon
 
I might be barking up the wrong tree, but if you look in /usr/local/etc/rc.d/mysql-server:

Code:
start_precmd="${name}_prestart"
...
mysql_prestart()
{
        if [ ! -d "${mysql_dbdir}/mysql/." ]; then
                mysql_create_auth_tables || return 1
        fi 
        return 0
}

I think that's what the "precmd" message is referring to - that mysql_prestart has failed, and it doesn't like something to with your data directory.

Good luck!
richardtoohey2,

I don't have a /usr/local/etc/rc.d/mysql-server ; I also tried /mysql

Yes I need it!

Best Regards,

Brandon
 
When I do: (This is the error): When trying to start mysql-server after the restart failed.

Code:
root@mariadbjail:~ # service mysql-server start
Please merge existing /usr/local/etc/my.cnf file with /usr/local/etc/mysql/conf.d/server.cnf
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
root@mariadbjail:~ # service mysql-server status
mysql is not running.
root@mariadbjail:~ #
In reference to your previous message about not having /usr/local/etc/rc.d/mysql-server - it appears in the message you pasted (3rd line above), so not sure what that means. Maybe something to do with MariaDB versus MySQL.

If your databases are still there that looks very hopeful!
 
In reference to your previous message about not having /usr/local/etc/rc.d/mysql-server - it appears in the message you pasted (3rd line above), so not sure what that means. Maybe something to do with MariaDB versus MySQL.

If your databases are still there that looks very hopeful!
richardtoohey2,

I looked again and this is what I found:

Code:
root@mariadbjail:~ # cd /usr/local/etc/rc.d
root@mariadbjail:/usr/local/etc/rc.d # ls -l
total 54
-rwxr-xr-x  1 root  wheel  6132 Apr 12 05:14 apache24
-rwxr-xr-x  1 root  wheel  3070 Apr  8 08:06 garb
-rwxr-xr-x  1 root  wheel   593 Apr 14 01:15 git_daemon
-rwxr-xr-x  1 root  wheel  1732 Apr 12 05:14 htcacheclean
-rwxr-xr-x  1 root  wheel  4230 Apr 13 06:35 mysql-server
-rwxr-xr-x  1 root  wheel  1212 Apr 12 02:38 php-fpm
-rwxr-xr-x  1 root  wheel   986 Apr  7 09:52 rsyncd
-rwxr-xr-x  1 root  wheel  1361 Apr  7 11:06 snmpd
-rwxr-xr-x  1 root  wheel   718 Apr  7 11:06 snmptrapd
-rwxr-xr-x  1 root  wheel  1021 Apr 12 04:56 svnserve
-rwxr-xr-x  1 root  wheel  1143 Apr  7 05:10 tcsd
-rwxr-xr-x  1 root  wheel   527 Apr  7 05:06 tpmd
root@mariadbjail:/usr/local/etc/rc.d # cd mysql-server
mysql-server: Not a directory.
root@mariadbjail:/usr/local/etc/rc.d #

I am glad to read that it's good news I see my databases! This is intense! :p

Creating a new jail for a Fresh MariaDB...

Does the following look reasonable?:

- Tar Fresh MariaDB Install (New Jail)'s /var/db/mysql (from the fresh)
- Tar /var/db/mysql from Failed MariaDB Jail
- Create new directory in /var/db/mysql_restore/ and extract the tarred /var/db/mysql (Failed MariaDB Jail)
- Then exclude Fresh /var/db/mysql folders/files and merge the /var/db/mysql_restore/ folders/files (minus the ones from the Fresh Installs Version)
- Restart MariaDB Server
- Login to mysql using CLI and check to see if the databases show
- Create Users again?
- Set Users Permissions again?

Thank you very much!

Best Regards,

Brandon
 
I was just going on you saying that you were saying you could see your databases! So I was just commenting on what you said.

Looks like you do have the mysql-server RC script - doesn’t help other than showing it might be the data directory setting.

Yes I’d try a clean install and copy across your old MySQL data files and see if you can get the new MariaDB install to access them before you change any .cnf files. You may have permission or other issues so not saying it will be easy but better to try things on a test environment.

As you do that you might see some clue as to what you’ve done on the original install and be able to fix that.

Or someone might come along in the meantime with a fix for your original problem. In which case leave the new environment for your future experiment!
 
I was just going on you saying that you were saying you could see your databases! So I was just commenting on what you said.

Looks like you do have the mysql-server RC script - doesn’t help other than showing it might be the data directory setting.

Yes I’d try a clean install and copy across your old MySQL data files and see if you can get the new MariaDB install to access them before you change any .cnf files. You may have permission or other issues so not saying it will be easy but better to try things on a test environment.

As you do that you might see some clue as to what you’ve done on the original install and be able to fix that.

Or someone might come along in the meantime with a fix for your original problem. In which case leave the new environment for your future experiment!
richardtoohey2:

100% ; I just setup Splash HTML Upgrade Notices on my public websites! I would like to know how to resolve the original MariaDB Jail; perhaps you are right and someone will come along and school me on this. I sure appreciate you!

Upgrading Ports on the New MariaDB Jail right now! (Current or Future Experiment) - 100%


Update: 05/02/2022 @ Approx. 05:58:

I have created a new up to date jail; installed a fresh copy of identical port mariadb105-server.
I have copied a tar with /var/db/mysql from my broken MariaDB server to my new MariaDB Jail Server and called it "/var/db/mysql0"
I edited /usr/local/etc/mysql/conf.d/server.cnf and changed datadir = /var/db/mysql to "datadir = /var/db/mysql0"

I then restarted MariaDB on the New Jail and logged in.

I do show databases; and it doesn't "auto detect" all my databases in /var/db/mysql0

Code:
root@NewMariaDB:/usr/local/etc/mysql/conf.d # mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.5.15-MariaDB FreeBSD Ports

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@NewMariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.003 sec)

root@NewMariaDB [(none)]>

I'm not sure how to proceed. I feel as if there are extra steps to take.

Update 2: 05/02/2022 @ Approx. 06:33:
I found this thread:
https://forums.freebsd.org/threads/mariadb-post-installation-question.58362/
and tried the solution from OP.

Code:
root@mariadbserver:/var/db # /usr/local/bin/mysql_install_db --basedir=/usr/local

WARNING: The host 'mariadbserver' could not be looked up with /usr/local/bin/resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MariaDB version. The MariaDB daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MariaDB privileges !
mysql.user table already exists!
Run mysql_upgrade, not mysql_install_db

root@mariadbserver:/var/db # mysql_upgrade
This installation of MariaDB is already upgraded to 10.5.15-MariaDB.
There is no need to run mysql_upgrade again for 10.5.15-MariaDB.
You can use --force if you still want to run mysql_upgrade

root@mariadbserver:/var/db # service mysql-server onestatus
mysql is running as pid 13346.
root@mariadbserver:/var/db # service mysql-server restart
Stopping mysql.
Waiting for PIDS: 13346.
Starting mysql.

root@mariadbserver:/var/db # mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.15-MariaDB FreeBSD Ports

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@mariadbserver [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.002 sec)

root@mariadbserver [(none)]>

Crash & Burned!
File: /usr/local/etc/mysql/conf.d/server.cnf reflects datadir = /var/db/mysql to /var/db/mysql0 (Old MariaDB Data Folder Copied Over) & it has mysql:mysql permissions on the folder, just like the default installation at /var/db/mysql ...
Directory of /var/db/:
Code:
root@mariadbserver:/var/db # ls -l
total 2344
drwx------    2 operator  operator        2 Jul  5  2020 entropy
drwxr-xr-x    2 root      wheel           3 Apr 16 23:43 fontconfig
drwx------    2 root      wheel           2 Jul  5  2020 freebsd-update
drwx------    2 root      wheel           2 Jul  5  2020 hyperv
drwx------    2 root      wheel           2 Jul  5  2020 ipf
-r--r--r--    1 nobody    wheel     3165206 Apr 16 04:22 locate.database
drwxr-xr-x    4 mysql     mysql          12 May  2 13:23 mysql
drwxr-xr-x  540 mysql     mysql         547 May  2 01:50 mysql0
drwxr-xr-x    2 ntpd      ntpd            2 Jul  5  2020 ntp
-rw-r--r--    1 root      wheel       10659 Oct 22  2021 ntpd.leap-seconds.list
drwxr-xr-x    2 root      wheel           6 May  2 10:13 pkg
drwxr-xr-x  137 root      wheel         137 May  2 10:07 ports
drwxr-xr-x    3 root      wheel          10 May  2 07:06 portsnap
-rw-r--r--    1 root      wheel     2097920 Jul  5  2020 services.db
drwxr-xr-x    2 root      wheel           3 May  2 11:46 test2
drwxr-xr-x    3 root      wheel           3 Jul  5  2020 zfsd
root@mariadbserver:/var/db #



Best Regards,

Brandon
 
Alright; I didn't solve the original mysql-server / MariaDB Server 10.5.x error;

However I was able to do as richardtoohey2 suggested and it worked great!

Once I copied the /var/db/mysql from Crashed Server to duplicate MariaDB Server 10.5.x (New Jail) and attempted to change the data dir path from my.cnf (which inherits conf.d/* , server.cnf); doing this alone did not work.

I had to disable the stock version (from new installation) /var/db/mysql to /var/db/mysql_disabled and then I did mv /var/db/mysql0 to /var/db/mysql

Then chown -R mysql:mysql /var/db/mysql

At this point; the new MariaDB 10.5.x Server Jail did not match IP settings for ezjail-admin that the old one did.

So I turned the jail off; and ran "ezjail-admin archive NewMariaDBJail" ; offloaded a copy for backup and then deleted it.

I then re-created "NewMariaDBJail" using the archived NewMariaDBJail ezjail-admin Jail; only this time, using the old server's IP settings.

Brought up the New Jail; edited the /usr/local/etc/mysql/conf.d/server.cnf and updated the IP settings and created a new logfile name to keep all things separate and new.

Restarted the Jail and Viola!

title_g5-thelegendofzelda-450x191.gif

Image Source: Picture Source

Code:
root@Jail:~ # mysql -h LOCALIP -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.5.15-MariaDB FreeBSD Ports

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@NewMariaDBJail [(none)]> show databases;


OUTPUT:

ALL 539 Databases: (ommitted),

| mysql                                |
| performance_schema                   |
| phpmyadmin                           |    |
+--------------------------------------+
539 rows in set (0.092 sec)

root@NewMariaDBJail [(none)]>


Thank you richardtoohey2 and thumbs from #irc.libera.chat #mysql for verifying my strategy before I attempted it. He also suggested to chown and I wouldn't have done that since it already showed "mysql" as the user; however, now I believe it processed to the "current jail/installation"

SOLVED! Out of the Woods! :)
 
attempted to change the data dir path from my.cnf (which inherits conf.d/* , server.cnf); doing this alone did not work.
Doesn't work for the datadir, the way the rc(8) script is set up that datadir is supplied as an argument, which always overrules the setting from my.cnf. Set mysql_dbdir in rc.conf to change it.
 
Doesn't work for the datadir, the way the rc(8) script is set up that datadir is supplied as an argument, which always overrules the setting from my.cnf. Set mysql_dbdir in rc.conf to change it.
SirDice,

Excellent knowledge shared here. I appreciate it!

/etc/rc.conf line:

Code:
mysql_dbdir="/var/db/mysql"

Code:
mysql_dbdir="/var/db/newmysql"

Would the above be correct understanding of what you keyed me into?

Best Regards,

Brandon
 
Back
Top