Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 222
ScoRpion Avatar asked Jan 04 '12 08:01

ScoRpion


People also ask

How can I import 100 MB SQL File in PHPMyAdmin?

Ok you use PHPMyAdmin but sometimes the best way is through terminal: Connect to database: mysql -h localhost -u root -p (switch root and localhost for user and database location) Start import from dump: \. /path/to/your/file. sql.


1 Answers

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

like image 118
manish thanki Avatar answered Nov 15 '22 09:11

manish thanki