Command line import of database using latin1 encoding
- by chrisjlee
I'm using a particular cloud hosting solution (one which i won't name) and they don't provide ssh access so i'm at a whim on how the database is dumped.
I downloaded the dump which is packed into a tar.gz file. I discover that this file utilizes latin1 encoding. Which i don't get to specify the encoding for the host i'm using because i don't have SSH access or DB access.
I try to import it via command line for my local development environment (mysql -uroot foodb < file.db) like i usually do with other databases but am having problems.
Is it possible to import a database via command line by specifying which encoding (preferably latin1) before importing it? Or do i have to convert it to UTF8?