How to import data (.sql fle) into mysql larger than 200 MB

I have a backup copy of a 200 MB database, and I want to import it into my database. I tried and I received an error message indicating that the size is larger. I tried with php.ini and increased the upload file size 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 only allows you to download 8 MB. How can I restore a database in mysql that is much larger than 2 or 8 MB.

+6
source share
6 answers

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

  • Create an SSH connection.
  • Open "Restore" or "Run the big wizard" Script in the "Database" menu, select the SQL file, connection, target database
  • Click Run.

Try the trial version. Command line supported.

+3
source

Make these changes to the php.ini file.

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

+5
source

Do you import with PHP or just MySQL?

This may help: MySQL Error 1153 - received a packet that is larger than max_allowed_packet bytes

If this does not work, you can try using the SQL dump file delimiter, for example: http://www.rusiczki.net/2007/01/24/sql-dump-file-splitter/

+1
source

Try changing post_max_size in php.ini as follows:

 post_max_size = 300M 

Please tell me the result.

0
source

open: /wamp/bin/apache/apachex.xx/bin/php.ini SAME AS /wamp/bin/php/phpx.xx/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

0
source

If you still have problems, try and edit the phpmyadmin.conf file in the alias folder (x: \ wamp \ alias). For example: php_admin_value upload_max_filesize 250M php_admin_value post_max_size 250M php_admin_value max_execution_time 3600 php_admin_value max_input_time 3600 Together with setting up php.ini files this worked for me

0
source

Source: https://habr.com/ru/post/905063/


All Articles