Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On MySQL import: ERROR at line 32769: Unknown command '\''

I'm receiving the following error while trying to import my DB:

ERROR at line 32769: Unknown command '\''.

I've done some searching and found that this can be because the dump was not created with the --hex-blob command.

Unfortunately, I don't have the opportunity to do that now as this was the last backup made prior to my host having an untimely raid/hardware failure.

Is there anything I can do to get my DB imported?

Update:

Tried using --force and --max_allowed_packet=1000M when importing. Here's a sample of what it returned...

ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}',1,1352344791,0),('performanceCache','',0,1317594187,0),('promenu','a:1:{s:7:\' at line 1
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a:7:{i:9' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a:19:{s:10:\"promenu_id\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's:1:\"9\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's:13:\"promenu_title\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th                                                                                                             line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th                                                                                                             iption\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th                                                                                                             ' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th
/*!40000 ALTER TABLE `cache_store` ENABLE KEYS */' at line 1
ERROR at line 682781: Unknown command '\''.
ERROR at line 682781: Unknown command '\''.
ERROR at line 682781: Unknown command '\''.
ERROR at line 682781: Unknown command '\''.
ERROR 1153 (08S01) at line 682781: Got a packet bigger than 'max_allowed_packet'
like image 300
user1950142 Avatar asked Oct 21 '22 20:10

user1950142


1 Answers

Tried MySQLWorkbench and realized I forgot to add --default-character-set=utf8 during command line. Tried it again with --default-character-set=utf8 and now import works from command line too.

The command line I have is:

mysql -u <username> -pac1 <password> --default-character-set=utf8 <schema> < <dumpfile>
like image 146
paulito415 Avatar answered Oct 24 '22 10:10

paulito415