6

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.

janosrusiczki
  • 1,920
  • 2
  • 20
  • 41
ScoRpion
  • 11,364
  • 24
  • 66
  • 89

6 Answers6

6

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

ᴘᴀɴᴀʏɪᴏᴛɪs
  • 7,169
  • 9
  • 50
  • 81
manish thanki
  • 63
  • 1
  • 2
3

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.

Devart
  • 119,203
  • 23
  • 166
  • 186
1

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

Chris
  • 4,593
  • 1
  • 33
  • 37
1

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/

Community
  • 1
  • 1
MarkSmits
  • 538
  • 2
  • 7
0

If there are still 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 tweaking the php.ini files this worked for me

0

Try to change post_max_size in your php.ini like this:

post_max_size = 300M

Tell me the result please.

Mohammad Saberi
  • 12,864
  • 27
  • 75
  • 127
  • 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 Jan 04 '12 at 09:01