Error 2005 (HY000) unkonw MySQL server host…

ERROR ERROR when mysql import backup data 2005(HY000) Unkonw mysql Server Host…
ERROR ERROR 1204(HY000) Unkonw mysql Server host…

use mysqldump command to backup the database to an external file, but when using mysql command line to import the backup data, ERROR 2005(HY000) unkonw mysql server host… error
Solutions:
because in peacetime work often use mysqldump command to export the backup data, and then use the mysql client source command in the command line tools to import data, never out of the fault, the only difference is the character set is different, this time to import the database character set is utf8, so they are associated with the need for mysql client command line tools specified character set, after reviewed the help, Open mysql client tool mysql-uroot-p – default-character-Set = UTf8 with the following command, then import the backup data, and everything is OK.


Read More: