Bobcares

phpMyAdmin max upload size – Is it preventing database restore?

by | Feb 14, 2020

Oops!! Not able to import your SQL backups via phpMyAdmin?

PhpMyAdmin max upload size determines the size of the database backup that can be restored. Often large backup restores fail due to this limit.

At Bobcares, we often get requests from our customers regarding phpMyAdmin as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix this problem.

 

What is PHPMyAdmin?

PhpMyAdmin is one of the most widely used MySQL administration tools which provides a GUI for MySQL database management.

We can import and export databases via phpMyAdmin in a similar way as we dump and restore via the command line. Here, it saves data as database dumps.

However, server owners often impose restrictions on the server regarding file uploads, database access, etc. This in a way is to tighten the security of database servers against hack attempts.

Thus, while dealing with phpMyAdmin, users may encounter some problems with importing large backups.

Today, let’s see how our Engineers simplifies such a situation within a few minutes.

 

How do we fix?

Recently, one of our customers reported errors while trying to import a backup file via phpMyAdmin.

Here, our Engineers checked in detail and found that he was trying to restore a 46 MB file. But, the allowed limit for him was only 2 MB (2048KB) as given in the screenshot.

phpMyAdmin max upload size

So, we increased the limit to 50 MB. For that, we modified the PHP configuration file used by PHPMyAdmin.

Firstly, we opened the file /etc/phpX/apache2/php.ini.

vi /etc/phpX/apache2/php.ini

Then, we searched for  upload_max_filesize and changed the value to 50 MB as per the customer request.

phpMyAdmin max upload size

At last, we restarted the Apache service using the command below:

service apache2 restart

That fixed the problem and the customer could import the file successfully.

 

Restore via command line

For websites hosted on Shared servers, modifying the server-wide PHP limits may not be a feasible solution. Therefore, our Dedicated Engineers suggest the customers upload the database to their home directory.

We then use the commands below for taking the dump of the database and restoring it via the command-line.

For backing up a MySQL database, as the root user, we run:

mysqldump -u (username) -p (name of database) > (file name).sql

And, for importing the backup we use the syntax below:

mysql -u (username) -p (name of database) < (filename).sql

 

[Need assistance in fixing phpMyAdmin errors? – We’ll help you]

 

Conclusion

In conclusion, we can increase the phpMyAdmin max upload size by altering the values in PHP configuration. Today, we saw how our Support Engineers help our customers having trouble with importing the backups in phpMyAdmin.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.