0

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

Email
  • 101
  • 2
  • 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. –  Aug 07 '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 08 '14 at 08:19

2 Answers2

0

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.

user1622951
  • 147
  • 6
  • hi. this folder does NOT exists. also there is NO setting in phpmyadmin folder. don't know why the upvote though... – Email Aug 08 '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 04 '15 at 13:27
0

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
user1622951
  • 147
  • 6