While importing mysqldump file ERROR 1064 (42000) near ' ■/ ' at line 1

后端 未结 3 1039
陌清茗
陌清茗 2021-01-31 05:03

Cannot import the below dump file created by mysqldump.exe in command line of windows

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET         


        
3条回答
  •  死守一世寂寞
    2021-01-31 05:38

    It seems that the input file (mysqldumpfile.sql) was created in UTF-8 encoding so these first 3 bytes "at line 1" invisible to you in the .SQL file is the byte order mark (BOM) sequence

    So try to change default character set to UTF-8

    mysql --user=root --password=root --default_character_set utf8 < mysqldumpfile.sql
    

提交回复
热议问题