I've been told that redirection via shell (e.g. < and > ) can (not always) affect the collation of a database (.e.g utf8). How can I import an export without redirecting so that I don't have to worry about this.
|
|
|||||||
|
|
There's always the mysqlimport utility, however, your source would have to be delimited values... such as those obtained from a "SELECT * FROM ... INTO OUTFILE ..." If you're moving large amounts of data, it might be faster to use this bulk loading method anyway. Beware of the consequences it may have with replication however. |
|||||||
|
|
You may want to do this command on the import server
This will show you the default collation of the database you want to import into. You can also change the import database's collation if needed. UPDATE !!! First of all, I would look at the what the OS says the character set is. On the Linux command line just run this:
From the MySQL point of view You could explicitly name the default character set in the mysqldump
You can see it in the mysql client:
Give it a Try !!! As for collation, you may need to set one or more environment variables like these:
Set these explicitly upon export for mysqldump and import for mysql as follows:
|
|||||||||||||||
|
|
Well, you could log into MySQL and do:
That takes the shell out of the picture altogether - but I would still recommend double-checking environment variables like |
|||
|
|
