extract_schema_from_file_name
This function takes a file path and returns the schema name it belongs to, assuming the file is located within the schema's directory.
Syntax
sys.extract_schema_from_file_name(path)Description
Examples
SELECT sys.extract_schema_from_file_name('/usr/local/mysql/data/db/t1.ibd');
+----------------------------------------------------------------------+
| sys.extract_schema_from_file_name('/usr/local/mysql/data/db/t1.ibd') |
+----------------------------------------------------------------------+
| db |
+----------------------------------------------------------------------+See also
Last updated
Was this helpful?

