Hi,
Please note that ignore_db_dirs refer to the directory name, as opposed to the database name, and the difference is important here.
From your output, it looks like you previously ran
create database `lost+found`, and not
mkdir <datadir>/lost+found.
If you look into your datadir, you'll see that the existing directory is not lost+found, it's something like lost@002bfound. It gets converted back when you run show databases.
It works the same way in 5.5.38 and 10.0, see output from 5.5.38 below.
MariaDB [test]> select @@version;
+----------------+
| @@version |
+----------------+
| 5.5.38-MariaDB |
+----------------+
1 row in set (0.00 sec)
MariaDB [test]> select @@ignore_db_dirs;
+------------------+
| @@ignore_db_dirs |
+------------------+
| lost+found |
+------------------+
1 row in set (0.00 sec)
MariaDB [test]> select @@datadir;
+--------------------------------------------------+
| @@datadir |
+--------------------------------------------------+
| /data/releases/mariadb-5.5.38-linux-x86_64/data/ |
+--------------------------------------------------+
1 row in set (0.00 sec)
MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/
aria_log.00000001 aria_log_control ibdata1 ib_logfile0 ib_logfile1 mysql performance_schema test wheezy-64.err wheezy-64.pid
MariaDB [test]> system mkdir /data/releases/mariadb-5.5.38-linux-x86_64/data/lost+found
MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/
aria_log.00000001 aria_log_control ibdata1 ib_logfile0 ib_logfile1 lost+found mysql performance_schema test wheezy-64.err wheezy-64.pid
MariaDB [test]> show databases like "lost+found";
Empty set (0.00 sec)
MariaDB [test]> create database `lost+found`;
Query OK, 1 row affected (0.00 sec)
MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/
aria_log.00000001 ibdata1 ib_logfile1 lost+found performance_schema wheezy-64.err
aria_log_control ib_logfile0 lost@002bfound mysql test wheezy-64.pid
MariaDB [test]> show databases like "lost+found";
+-----------------------+
| Database (lost+found) |
+-----------------------+
| lost+found |
+-----------------------+
1 row in set (0.00 sec)
Hi,
Please note that ignore_db_dirs refer to the directory name, as opposed to the database name, and the difference is important here.
From your output, it looks like you previously ran
create database `lost+found`, and not
mkdir <datadir>/lost+found.
If you look into your datadir, you'll see that the existing directory is not lost+found, it's something like lost@002bfound. It gets converted back when you run show databases.
It works the same way in 5.5.38 and 10.0, see output from 5.5.38 below.
MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/ aria_log.00000001 aria_log_control ibdata1 ib_logfile0 ib_logfile1 mysql performance_schema test wheezy-64.err wheezy-64.pid MariaDB [test]> system mkdir /data/releases/mariadb-5.5.38-linux-x86_64/data/lost+found MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/ aria_log.00000001 aria_log_control ibdata1 ib_logfile0 ib_logfile1 lost+found mysql performance_schema test wheezy-64.err wheezy-64.pid MariaDB [test]> show databases like "lost+found"; Empty set (0.00 sec)MariaDB [test]> create database `lost+found`; Query OK, 1 row affected (0.00 sec) MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/ aria_log.00000001 ibdata1 ib_logfile1 lost+found performance_schema wheezy-64.err aria_log_control ib_logfile0 lost@002bfound mysql test wheezy-64.pid MariaDB [test]> show databases like "lost+found"; +-----------------------+ | Database (lost+found) | +-----------------------+ | lost+found | +-----------------------+ 1 row in set (0.00 sec)