Command line import of database using latin1 encoding

Posted by chrisjlee on Server Fault See other posts from Server Fault or by chrisjlee
Published on 2012-09-07T18:55:28Z Indexed on 2012/09/07 21:40 UTC
Read the original article Hit count: 295

Filed under:
|
|

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?

© Server Fault or respective owner

Related posts about mysql

Related posts about database