PhpMyAdmin File too big error while trying to import sql

Hi guys, I am trying to import a database file (.sql) using phpmy admin on a client server.

I get the file too big an error, even if I have the opportunity to split the file into pieces, etc., but I still get the error. The download size is 50 MB, and the file I'm trying to import is 90 MB (for db.)

I had the same error in MAM and I know that I can change maz_size_limit and similar things, but I'm not sure what to do on the client server. I have access to cpanel, but I do not see any parameters.

I can import the same file to my server, even if I install it on 64 MB, as it is capable of slicing and importing.

What are my options here?

I tried using mysequal pro since it worked for MAMP on my local computer, but I cannot do this for this client server.

Any ideas?

+6
phpmyadmin
source share
8 answers

What access do you have on your client server?

If you have access to the terminal, then these answers will work.

Otherwise, a very ugly way to do this is to create an .htaccess file to change the PHP settings to get the sql file downloaded via PHPmyAdmin.

In your .htaccess file you should put:

 php_value upload_max_filesize 80M php_value post_max_size 80M php_value max_execution_time 300 php_value max_input_time 300 

Make sure you delete the .htaccess file as soon as you are done. Also, this will not work if your client server uses Apache to prevent overrides.

+2
source share

It is best to use an FTP server for the server and then ssh in (command line) and import the database this way. The resulting command will look something like this:

 mysql -hlocalhost -uUser -pPassword database_name < file_name 

Thus, you can completely circumvent any restrictions on downloading or processing files.

+5
source share

Another option:

/.../phpmyadmin3.2.0.1/config.inc.php

Find the line with $ cfg ['UploadDir'] and update it to:

$ cfg ['UploadDir'] = 'upload';

Create a directory named 'upload' in the phpmyadmin directory.

Put your file in this new download directory, then you will see a new drop-down menu on the import page.

Source: http://daipratt.co.uk/importing-large-files-into-mysql-with-phpmyadmin/

+4
source share

Is the file you are trying to import into a raw .sql form? If not, try zip / gzipping. For text files, you can see BIG file size reductions, which can allow you to download it without changing any PHP configuration files.

+2
source share

PHP usually has a file size limit for downloads. It is best to use an FTP file and log in via ssh and import the sql script through the mysql command line

0
source share

You can do this in the following ways:

  • You can go to the control panel / cpanel and add the host%. This means that the database server can now be accessed from your local computer. Now you can install and use MySQL Administrator or Navicat to import and export the database using PHP-Myadmin, I used it several times to load from 200 to 500 MB of data without problems.

  • Use gzip, bzip2 compression for export and import. I use PEA ZIP software (free) on Windows. Try to avoid Winrar and Winzip

  • Use the MySQL delimiter, which splits the sql file into several parts. In my personal proposal is not recommended

    1. Using the PHP INI setting (dynamically changing maximum load and maximum execution time), as mentioned by other friends, is fruitful, but not always.

    2. Alternatively, you can use SQLDUMP through the terminal if SSH is available.

0
source share

Try compressing the .SQL file before downloading it. I compressed 100 MB + to ~ 10 MB, but phpMyAdmin fails with this error:

Fatal error: the allowed memory size of 94371840 bytes has been exhausted (tried to allocate 106954753 bytes)

If your uncompressed .SQL file is less than or equal to 94 MB, it should work fine to honor it and load.

0
source share

You can use the command line to import any uncompressed file, regardless of its size.

 mysql -h <host> -u <user> -p <database> < path/file.sql 
  • if you use your localhost you don't need -h and
  • if the user does not have a password, you do not need -p
0
source share

All Articles