Cannot upload "to big" mysql file?
Posted: 09 Oct 2013, 14:45
Often when we want to backup Mysql files we need to adjust the file sizes the server accepts for upload.
So in /etc/php/php.ini we have some max sizes to adjust
Like:
upload_max_filesize, memory_limit and post_max_size
But still I I get protests like
Got a packet bigger than 'max_allowed_packet' bytes
And that is not to be found in php.ini
For that we need to find my.cnf
in my case it is in /etc/mysql/my.cnf
And in that file you will find
increase this value and restart mysqld:
This goes for MariaDB too.
if you have altered something in /etc/php/php.ini you may want to restart the server with
After this you should be able to upload your big mysql database.
So in /etc/php/php.ini we have some max sizes to adjust
Like:
upload_max_filesize, memory_limit and post_max_size
But still I I get protests like
Got a packet bigger than 'max_allowed_packet' bytes
And that is not to be found in php.ini
For that we need to find my.cnf
in my case it is in /etc/mysql/my.cnf
And in that file you will find
Code: Select all
max_allowed_packet = 10Mincrease this value and restart mysqld:
Code: Select all
sudo systemctl restart mysqldThis goes for MariaDB too.
if you have altered something in /etc/php/php.ini you may want to restart the server with
Code: Select all
sudo systemctl restart httpdAfter this you should be able to upload your big mysql database.
confusing but true
They are not the only guilty party since they depend on apache and php but the result is a big headache when you try to import databases; nevertheless.