Basically, I was taught on how to create a root password using the \"mysqladmin -u root -p password\" command, this was done all through the windows command editor. Now, the
mysql -s -N -username -p information_schema -e 'SELECT Variable_Value FROM GLOBAL_VARIABLES WHERE Variable_Name = "datadir"'
The command will select the value only from MySQL's internal information_schema database and disables the tabular output and column headers.
Output on Linux [mine result]:
/var/lib/mysql
or
mysql> select @@datadir;
on MYSQL CLI
and then
cd /var/lib/mysql && rm -rf test/NOTEMPTY
change path based on your result