Importing Large Database Error


We use the Windows SQLyog software and try to import a large database but the following error happens.

Error Code: 1153 - Got a packet bigger than ‘max_allowed_packet’ bytes

I know there are other topics to increase the max upload size but is for the php only and reflects the phpmyadmin import procedure.

We want to change the config from mariadb server to allow bigger db uploads but the my.cnf file on /etc/my.cnf is empty.

How to resolve this?

Thank you.

Please provide these details Bug Report Template — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

Provider: Upcloud

System: Centos 7.5

OLS or Enterprise?

Installing from official server or mirror server?

Replace JS/CSS files to JS Delivr?

Install Memcached extension for PHP?

Install LiteSpeed Memcached?

Install Memcached?

Install Redis extension for PHP?

Install Redis?


I want to edit the mariadb my.cnf file to tweak the max_allowed_packet so that we can increase it to import a large database file.

We use the software SQLyog to connect to database but when we try to import the sql file it throws an Error Code: 1153 - Got a packet bigger than ‘max_allowed_packet’ bytes

We want to increase the max_allowed_packet from mariadb config file but we can’t find it anywhere. The file it exists on /etc/my.cnf but is empty and doesn’t have the default values every my.cnf file has.

How to edit this value?

Thank you.

Try this guide, you will have your my.cnf populated, you can then adjust accordingly.

Platform services have been discontinued temporarily.
What other solution do we have? Thank you

mysql -u username -p database_name < data.sql
it will prompt for the password and it will import the data

To edit Mysql max_allowed_packet type:

nano /etc/mysql/my.cnf

Then add max_allowed_packet=500M under [client-server]
To exit nano, press Ctrl+X and then Y and press Enter
After that remember to restart Mysql

service mysql restart

You can verify the changes going to PhpmyAdmin, then Variables