I am trying to create a tablespace in a specific directory /home/tareq178/data/ in my Linux Ubuntu 22.04.3 VM.
I am using the following command
CREATE TABLESPACE newspace2 ADD DATAFILE "/home/tareq178/data/newspace2.ibd" engine=InnoDB;
But it's giving me ar error
ERROR 3121 (HY000): The directory does not exist or is incorrect.
The path already exists and I have given the directory ownership to mysql.

I have also specified innodb_directories in the "/etc/mysql/my.cnf" file
And if I type
show variables like "innodb_directories"
I can see the directory has been added correctly.

Still I get the same error. My Mysql version is mysql
Ver 8.0.36-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
How can I create a tablespace in a specific directory?
