当前位置: 动力学知识库 > 问答 > 编程问答 >

mysql - Error in Importing .sql file to working database

问题描述:

I've 7Gb .sql backupfile. I've to import it to my working database(mysql).

I've done:

$ mysql -u <username> -p

mysql> use database <databasename>

mysql>source <path_to_.sql_file>

It almost took 3-4 hrs and gave an error

ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option

--binary-mode is enabled and mysql is run in non-interactive mode.Set --binary-mode

to 1 if ASCII '\0' is expected.

So, I've tried

$ mysql -u <username> -p --binary-mode

mysql> use database <dbname>

mysql> source <pathtofile>

Again, after 3hrs, it ended with an so many errors with some of them being unkown character \n'. I think the error was repetitive. Initially I've tried opening the file to save it in UTF-8 encoding but It's taking more than 3 hrs to open completely.

分享给朋友:
您可能感兴趣的文章:
随机阅读: