3

"I am trying to import a backup file to MySQL. The file is 10GB but the problem I get an error when the backup reach the limit of max_allowed_packet which is: 1GB. Any idea how can I increase this number to 10GB ?"

I've tried to use this command:

mysql -u username -p database_name < file.sql

But i get the same error

I expect that i have to change the max_allowed_packet and net_buffer_length but how could i do that ?

Thank you!

ADyson
  • 57,178
  • 14
  • 51
  • 63
Julien
  • 33
  • 3

1 Answers1

3

Set the max_allowed_packet and net_buffer_length through mysql command line client

set global net_buffer_length=10000000; 

set global max_allowed_packet=10000000000;