Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

System: VPS, 1GB RAM, 1.2GHZ

Access: root, shell, anything

Versions: PHP 5.4.16,phpMyAdmin 4.2.7, 5.5.37 MariaDB, Apache/2.4.6 (CentOS 7)

Task: Import a 20mb (300k rows, 20 columns) sql dumb into phpMyAdmin

Result: Warning: "You probably tried to upload too large file"


i already tweaked in php.ini:

upload_max_filesize memory_limit post_max_size upload_max_filesize

i also used ftp to upload the .sql to the server - it should not depend on upload configs...

What else could i do? Where is the bottleneck?

Please consider i want to avoid BigDump..


share|improve this question
Why use phpmyadmin for this at all? The documentation link you provided lists using the 'source' command from within the mysql client. That has nothing to do with BigDump. – yoonix Aug 7 '14 at 23:58
What are the values of your php.ini Tweaks? Of course you could just upload the .sql file on your shell account instead and import it with e.g.: cat file.sql | mysql databasename – Marc Stürmer Aug 8 '14 at 8:19

you will have to change the mysql config to /etc/mysql/ there you must update or add

max_allowed_packet = 21M

or higher, and also their is a setting in phpmyadmin folder.

Please note that you can use K for kilobyte, M for megabyte and so on.

share|improve this answer
hi. this folder does NOT exists. also there is NO setting in phpmyadmin folder. don't know why the upvote though... – Email Aug 8 '14 at 18:16
that is the default folder for Ubuntu system where you can find the settings file.It may differ in CentOS or other operating systems. this is also true about the PhpMyAdmin installation. – Alex Robert Mar 4 '15 at 13:27

As I cannot comment, I will just answer here.

On most systems (RHEL especially), there's a file in /etc called my.cnf - in that file there shouldn't be much, besides a few lines. Simply just add:

max_allowed_packet = 21M

Or higher. You can change the value to any you wish, just do not change it too low (below 21M, as it will refuse the file to get uploaded), nor too high - in case of a loop of some sort.

However, also be sure that the line is in the [mysqld] section, and not any other.

If you cannot find my.cnf in /etc, run a find command to look on the whole disk for it.

find / -name my.cnf
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.