You give directory as source argument and expect cp
to copy the files. To do this, use -r
(recursive) option:
sudo cp -r -i /media/owner/ESD-USB/mysql /var/lib/
This will create (or overwrite the content of) /var/lib/mysql/
directory. You probably want it that way. Otherwise, if you want to copy the files from within mysql
to /var/lib/
(i.e. not to /var/lib/mysql/
) you may use:
sudo cp -i /media/owner/ESD-USB/mysql/* /var/lib/