While importing a full database on a remote server : mysql -h foo < dump_file.sql
, it returns ERROR 1153 ... Got a packet bigger than 'max_allowed_packet' bytes. But I don't have admin rights on that server to change my.cnf settings. The limit is 16Mb
I tried to optimize the dump like following, without result :
mysqldump --skip-extended-insert --net_buffer_length=10000 DATABASE_NAME > dump_file.sql
Would it be helpful to use LOAD DATA INFILE
Is there any possible syntax to use it without specifying INTO TABLE
... ?
LOAD DATA INFILE dump_file.sql
Or any other way to turn around that issue ?
EDIT : previous question asks :
Where do I change max_allowed_packet to be able to import the dump? Is there anything else I should set?
when I merely know where to change max_allowed_packet
, but I have not enough rights to do it.
So I specifically asked how to do it with CLI only, and if it would be helpful or not to use LOAD DATA INFILE
in my case, which is not at all in the other question. Whatever, duplicated or not, I got an answer who solved the issue.