How to Import data (.sql fle) in mysql whose size is greater than 200 MB

19,323

Solution 1

You can use a Restore or an Execute Large Script tools in dbForge Studio for MySQL; these tools will help you to execute SQL script against the database.

  1. Create SSH connection.
  2. Open Restore or Execute Large Script wizard in the Database menu, select the SQL file, connection, target database
  3. Click 'Execute'.

Try trial version. Command line is supported.

Solution 2

Make these changes into the php.ini file.

Find:

post_max_size = 8M 
upload_max_filesize = 2M 
max_execution_time = 30 
max_input_time = 60 
memory_limit = 8M 

Change to:

post_max_size = 750M 
upload_max_filesize = 750M 
max_execution_time = 5000 
max_input_time = 5000 
memory_limit = 1000M 

Then restart wamp/lampp/xampp for the changes to take effect

Solution 3

open: /wamp/bin/apache/apachex.x.x/bin/php.ini AS WELL AS /wamp/bin/php/phpx.x.x/php.ini

upload_max_filesize = 250M (this can vary according to the required size) 
post_max_size = 300M  (this needs to be bigger than previous line)
memory_limit = 350M  (this needs to be bigger than both the previous lines)

restart wamp

Solution 4

Are you importing with PHP or just plain MySQL?

This might help: MySQL Error 1153 - Got a packet bigger than 'max_allowed_packet' bytes

If that doesn't work out you could try to use an SQL dump file splitter like: http://www.rusiczki.net/2007/01/24/sql-dump-file-splitter/

Share:
19,323
ScoRpion
Author by

ScoRpion

I Work On PHP Symfony2 Magento Zend Fusebox Python OpenERP JavaScript JQuery Ajax ( JQuery And Prototype ) And I am passionate about sketching my new ideas into programming Applications.

Updated on June 16, 2022

Comments

  • ScoRpion
    ScoRpion almost 2 years

    I have a backup of database whose size is 200 MB, and i want to import it in my database. I tried and i got the error message saying the size is greater. I tried with php.ini and increased the size of upload file as :-

    ; Maximum allowed size for uploaded files.
    ; http://php.net/upload-max-filesize
      upload_max_filesize = 300M
    

    and when i restarted my wamp server it still allows to upload 8 MBs only. How can i restore the database in mysql whose size is much greater then 2 or 8 MB.

  • ScoRpion
    ScoRpion over 12 years
    i got the following error message No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.
  • ScoRpion
    ScoRpion over 12 years
    i am importing via phpmyadmin
  • MarkSmits
    MarkSmits over 12 years
    Here is a guide for importing SQL files using SSH.