How to Increase mySQL import limit in phpMyAdmin
How to Increase mySQL import limit in phpMyAdmin on a cPanel/WHM Server
You might see errors when trying to import mySQL database that in more than 50MB through phpMyAdmin. Most of us might have tried to increase the upload_max_filesize and post_max_size of the cPanel account by editing the php.ini file but it will not work. You must increase the cPanel PHP max upload size and cPanel PHP max POST size to fix the upload issue in phpMyAdmin.
1. Login to WHM (Webhost Manager) using server root login details
Link to access WHM : https://YourServerIP:2087
Enter ‘root’ in username field and enter server root password in the password field.
2. Search for “Tweak Settings” in WHM search bar
3. Click on “Tweak Settings” under “Server Configuration”
WHM Home » Server Configuration » Tweak Settings
4. Click on “PHP” tab in “Tweak Settings” and change cPanel PHP max upload size
Also change cPanel PHP max POST size to a higher value like shown in the below picture.
5. Save the changes you have made in tweak settings. Click on “Save”
Increase cPanel php_upload_max_filesize and cPanel php_post_max_size from server backend
You can do the above steps from the server backend by editing the tweak settings configuration file.
1. Log into WHM server via SSH as ‘root’
2. First take a backup of tweak settings /var/cpanel/cpanel.config before making any changes
Command to take backup : cp -a /var/cpanel/cpanel.config /var/cpanel/cpanel.config.backup
3. Edit Tweak settings configuration file using vi editor
Increase the below values
By default php_post_max_size will be 55MB and php_upload_max_filesize will be 50M. If the phpMyAdmin database imports fails then you must increase these values accordingly. Example : if the database size is 150M then you must change the above values to 150M.
Save the tweak settings file and exit.
4. Don’t forget to update ‘Tweak Settings’ after increasing the above values
Command : /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings
5. Restart cPanel service
Command : service cpanel restart
Now try uploading the mySQL database through cPanel and you won’t face any issues. You can also restore the SQL backup from server backend and there is no size limit.
Command to restore the database backup from server backend is given below
Syntax : mysql [databasename]