×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: userc865b
Added: Jun 21, 2017 12:34 PM
Modified: Jun 21, 2017 12:46 PM
Views: 4
Tags: mysql
wenn man eine Datei einliest zum Beispiel und man einen sehr großen SQL Befehl aufeinmal ausführen will, dann muss es entsprechend erhöht werden!
  1. SET GLOBAL max_allowed_packet=100000000;
  2.  
  3.  
  4. The maximum size of one packet or any generated/intermediate string.
  5.  
  6. The packet message buffer is initialized to net_buffer_length bytes, but can grow up to max_allowed_packet bytes when needed. This value by default is small, to catch large (possibly incorrect) packets.
  7.  
  8. You must increase this value if you are using large BLOB columns or long strings. It should be as big as the largest BLOB you want to use. The protocol limit for max_allowed_packet is 1GB. The value should be a multiple of 1024; nonmultiples are rounded down to the nearest multiple.
  9.  
  10. When you change the message buffer size by changing the value of the max_allowed_packet variable, you should also change the buffer size on the client side if your client program permits it. The default max_allowed_packet value built in to the client library is 1GB, but individual client programs might override this. For example, mysql and mysqldump have defaults of 16MB and 24MB, respectively. They also enable you to change the client-side value by setting max_allowed_packet on the command line or in an option file.
  11.  
  12. The session value of this variable is read only. The client can receive up to as many bytes as the session value. However, the server will not send to the client more bytes than the current global max_allowed_packet value. (The global value could be less than the session value if the global value is changed after the client connects.)