I am trying to import a mysql file to my cpanel phpmyadmin. But I am getting this error message. "#1153 - Got a packet bigger than 'max_allowed_packet' bytes"
I have tried putty as well. But the error message is same. I don't know how to change the mox upload size in mysql in cpanel.
Please help me
Thank you so much
The fix is to increase the MySQL daemon’s max_allowed_packet. You can do this to a running daemon by logging in as Super and running the following commands.
Then to import your dump:
This error has nothing to do with the php.ini, its clearly an error message from the DBMS.
You can increase the value of the max_allowed_packet in the my.cnf file:
After restarting your mysqld it should work (for larger data increase the value more)
If you try to "import with putty", i guess your are using mysql from command line, in this case you can start mysql with the --max_allowed_packet parameter e.g:
Alternatively if you source the file from within a running mysql session you can set the parameter by:
last example only is effective till next restart of mysqld, for a permanent solution stick to my first example.
php -i | grep php.ini
Open the Loaded php.ini and modify "upload_max_filesize" and restart Apache (assuming u have apache)