import mysql data - specifiy charset

Discussion in 'Installation/Configuration' started by adam, Sep 15, 2006.

  1. adam

    adam New Member

    When you upload through phpMyAdmin there is a drop down box to select the charset of the file you are uploading through to import into your database.

    Does anyone know how to acheive this using the command line mysql command?

    I can get the database to import just fine but I can't tell my system it's a UTF8 encoded file while the data has to be put into a latin1 database. This ends up putting the data in as UTF8 which is going to cause problems on my site.

    mysql --user=root --pass=xxxx --host=localhost -e "source localhost.sql"

    I've tried converting the actual file to latin1 using gedit or kate but it complains there's things it can't convert.

    Unfortunately, I cannot upload the db through phpmyadmin as it is too big.
  2. falko

    falko Super Moderator ISPConfig Developer

    Did you have a look at
    man mysql

Share This Page