I had a problem with MySQL on one of my DigitalOcean Ubuntu servers, so I compressed the files and have transferred them over to a new one.
I have moved the /var/lib/mysql folder over, which has the databases in, they are now visible in phpMyAdmin, but when I click them it says the table doesn’t exist, do I need to run a command to import it all, or should I start again and import it differently?
This depends on the storage engine you use on your source System. If you use MyISAM you can just copy the three file associated with your table (.frm, .MYD, .MYI) to your target machine, restart the MySQL Service and your tables are there. With all other storage engines you should use
mysqldump
from a comandline (see here).