Increase the max_allowed_packet in MySQL

/ Published in: MySQL
Save to your folder(s)

If you every get hit by ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes, then this might help.
You also need to make sure that the user that you log in with has SUPER privileges on their account.

Copy this code and paste it in your HTML
  1. #To access mysql console
  2. mysql -u username -p -h localhost
  4. #See variable max_allowed_packet and then set it to 100Mb
  5. show variables like '%max_allowed_packet%';
  6. set global max_allowed_packet=1000000000;
  8. #exit
  9. /x
  11. #run import
  12. mysql -u username -p -h localhost database_name < sql_to_import.sql


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.