Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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"

documentation: http://docs.phpmyadmin.net/en/latest/faq.html#i-cannot-upload-big-dump-files-memory-http-or-timeout-problems

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..

thanks

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 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 at 8:19

2 Answers 2

you will have to change the mysql config to /etc/mysql/my.cf 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 at 18:16

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

 
discard

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.