This is such a weird problem that I can't even imagine where to begin diagnosing it.
mariadb 10.4.11 is installed and running. The config file is /usr/local/etc/my.cnf, and is presumably being read:
I start a copy of the command-line console, pointing it at the config file, and confirm that
Listing the databases shows that the
/Work/tables/mapdata does exist, and should be being listed.
MariaDB [(none)]>
[/code]
So where is it pointing, since it's obvious not pointing at /Work/tables as it should be?
I created that database TIPOFF as a test.
But trying to add a table to that database fails with a "no such file" error:
And if I do a
Calling
But
And
I'm utterly stumped.
mariadb 10.4.11 is installed and running. The config file is /usr/local/etc/my.cnf, and is presumably being read:
Code:
5:48:43 Sun, 05 Jan
[root/fastcat]~> ps | grep mysql
764 - Is 0:00.02 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/usr/local/etc/my.cnf --user=mysql --
976 - I 0:01.97 /usr/local/libexec/mysqld --defaults-extra-file=/usr/local/etc/my.cnf --basedir=/usr/local --d
1917 1 S+ 0:00.00 grep mysql
I start a copy of the command-line console, pointing it at the config file, and confirm that
datadir
is /Work/tables:
Code:
5:48:56 Sun, 05 Jan [root/fastcat]~> mysql --defaults-file="/usr/local/etc/my.cnf" --user=root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 31
Server version: 10.4.6-MariaDB-log 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.
MariaDB [(none)]> show variables like "datadir%" ;
+---------------+---------------+
| Variable_name | Value |
+---------------+---------------+
| datadir | /Work/tables/ |
+---------------+---------------+
1 row in set (0.001 sec)
MariaDB [(none)]>
Listing the databases shows that the
datadir
it's using is NOT /Work/tables because it doesn't list the mapdata database:
Code:
MariaDB [(none)]> show databases ;
+--------------------+
| Database |
+--------------------+
| TIPOFF |
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.000 sec)
Code:
6:01:13 Sun, 05 Jan [root/fastcat]~> ls /Work/tables
total 272208
drwxr-xr-x 2 root mysql 512 Aug 16 12:56 SSD/
-rw-rw---- 1 mysql mysql 164085760 Jan 3 18:00 aria_log.00000036
-rw-rw---- 1 mysql mysql 52 Jan 3 18:00 aria_log_control
-rw-rw---- 1 mysql mysql 276354 Dec 4 19:01 fastcat.local.lan.err
-rw-rw---- 1 mysql mysql 5 Dec 23 08:46 fastcat.pid
-rw-r----- 1 mysql mysql 956 Jan 3 18:00 ib_buffer_pool
-rw-rw---- 1 mysql mysql 50331648 Jan 3 18:00 ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 Aug 17 15:09 ib_logfile1
-rw-rw---- 1 mysql mysql 12582912 Jan 3 18:00 ibdata1
drwx------ 2 mysql mysql 15872 Dec 25 18:02 mapdata/
-rw-rw---- 1 mysql mysql 0 Apr 27 2018 multi-master.info
drwx------ 2 mysql mysql 2560 Apr 27 2018 mysql/
-rw-rw---- 1 mysql mysql 365 Nov 26 15:44 mysql-bin.000100
-rw-rw---- 1 mysql mysql 365 Nov 27 09:46 mysql-bin.000101
-rw-rw---- 1 mysql mysql 365 Nov 28 19:31 mysql-bin.000102
MariaDB [(none)]>
[/code]
So where is it pointing, since it's obvious not pointing at /Work/tables as it should be?
I created that database TIPOFF as a test.
But trying to add a table to that database fails with a "no such file" error:
Code:
MariaDB [(none)]> use TIPOFF ;
Database changed
MariaDB [TIPOFF]> create table foo ( bar int ) ;
ERROR 1 (HY000): Can't create/write to file '/Work/tables/TIPOFF/foo.MAI' (Errcode: 2 "No such file or directory")
MariaDB [TIPOFF]>
And if I do a
find / -type d -name "TIPOFF"
, it also fails to find it.
Code:
DING! Sun, 05 Jan
[root/fastcat]~> find / -type d -name TIPOFF
6:01:01 Sun, 05 Jan
[root/fastcat]~>
Calling
show binary logs
shows 4 of them:
Code:
MariaDB [TIPOFF]> show binary logs ;
+------------------+-----------+
| Log_name | File_size |
+------------------+-----------+
| mysql-bin.000001 | 28452 |
| mysql-bin.000002 | 342 |
| mysql-bin.000003 | 365 |
| mysql-bin.000004 | 475 |
+------------------+-----------+
4 rows in set (0.000 sec)
MariaDB [TIPOFF]>
But
find / -name "mysql-bin\.000001"
fails to find them:
Code:
6:09:13 Sun, 05 Jan
[root/fastcat]~> find / -name "mysql-bin\.000001"
6:18:10 Sun, 05 Jan
[root/fastcat]~>
And
fstat -v -p
doesn't tell me what mysql thinks it's doing:
Code:
6:18:10 Sun, 05 Jan
[root/fastcat]~> ps | grep mysql
764 - Is 0:00.02 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/usr/local/etc/my.cnf --user=mysql --
976 - I 0:02.33 /usr/local/libexec/mysqld --defaults-extra-file=/usr/local/etc/my.cnf --basedir=/usr/local --d
1920 1 I+ 0:00.02 mysql --defaults-file=/usr/local/etc/my.cnf --user=root
1985 2 S+ 0:00.00 grep mysql
6:20:22 Sun, 05 Jan
[root/fastcat]~> fstat -v -p 1920
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
root mysql 1920 text / 22814184 -rwxr-xr-x 4127096 r
root mysql 1920 ctty /dev 134 crw--w---- pts/1 rw
root mysql 1920 wd / 61797120 drwxr-xr-x 1536 r
root mysql 1920 root / 2 drwxr-xr-x 1024 r
root mysql 1920 0 /dev 134 crw--w---- pts/1 rw
root mysql 1920 1 /dev 134 crw--w---- pts/1 rw
root mysql 1920 2 /dev 134 crw--w---- pts/1 rw
root mysql 1920 3* local stream fffff8002e3a5d20 <-> fffff8002e6d1a50
I'm utterly stumped.