I have a directory:
/var/lib/mysql/test_db/
which contains numerous files that make up the test_db
database
I have now created a new directory:
/var/lib/mysql/data/
I am trying to move the test_db
directory and it's contents into the data
directory.
I've tried various commands revolving around
sudo mv /var/lib/mysql/test_db/ /var/lib/mysql/data/test_db/
But I keep getting the error:
mv: cannot move /var/lib/mysql/test_db/ to /var/lib/msyql/data/test_db/: No such file or directory
But if I run:
ls -lah
I get
drwxrwxrwx 2 root root 32K Mar 27 15:58 test_db
drwxrwxrwx 3 mysql mysql 4.0K Mar 30 10:51 data
which from what I can tell means they are both directories, and therefore both exist.
As you can see I have changed permissions on them both (chmod 777 test_db
), but that didn't work.
What am I missing?
/var/lib/msyql/data
create it or use roaima's answer – Skaperen Mar 30 '15 at 10:14cp -al ...
– Skaperen Mar 30 '15 at 10:16