Increasing mysql import size
I am trying to import a mysql file into my phpmyadmin cpanel. But I am getting this error message. "# 1153 - Received a packet larger than 'max_allowed_packet' bytes.
I also tried putty. But the error message is the same. I don't know how to change the size of the mox download in mysql in cpanel.
Please help me
Thank you very much
source to share
This error has nothing to do with php.ini, it is clearly an error message from the DBMS.
You can increase the value of max_allowed_packet in my.cnf file:
[mysqld]
max_allowed_packet = 128M
After restarting mysqld, it should work (to increase data more value)
If you try to "import with putty" I assume you are using mysql from the command line, in which case you can start mysql with the -max_allowed_packet option, for example:
mysql --max_allowed_packet=128M -u root -p sampledb < dump.sql
Alternatively, if you are posting a file from your current mysql session, you can set this parameter with:
set global max_allowed_packet=128M;
the last example is only valid until the next restart of mysqld, as the permanent solution sticks to my first example.
source to share
The fix is ββto increase the max_allowed_packet MySQL daemons. You can do this for a running daemon by logging in as Super and running the following commands.
# mysql -u admin -p
mysql> set global net_buffer_length=1000000;
Query OK, 0 rows affected (0.00 sec)
mysql> set global max_allowed_packet=1000000000;
Query OK, 0 rows affected (0.00 sec)
Then to import the dump:
gunzip < dump.sql.gz | mysql -u admin -p database
source to share