0

I want to import over 800MB size sql file to MySQL database in localhost XAMPP/phpmyadmin. But phpmyadmin UI doesn't allow to import more than 2MB.

What are the possible ways to do that such as any SQL query to import .sql file ?

Thank you in advance

I found that I can change the following values to php.ini file in xampp

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

What is the bect time for execution and input in order to not have exceptions and upload my file successfully?

Because it gives me something like this (this happens when I try to upload the zip file from sql file):

Fatal error: Out of memory (allocated 728760320) (tried to allocate 723280395 bytes) in C:\xampp2\phpMyAdmin\libraries\zip_extension.lib.php on line 55

When I try to upload the pure sql file it gives me this:

Fatal error: Maximum execution time of 300 seconds exceeded in C:\xampp2\phpMyAdmin\libraries\dbi\DBIMysqli.class.php on line 290

I have set in php.ini file the following:

post_max_size=1800M
max_execution_time=10000000
max_input_time=10000000
upload_max_filesize=900M
user3456789
  • 3
  • 1
  • 6
  • possible duplicate of [Importing larger sql files into MySQL](http://stackoverflow.com/questions/15278375/importing-larger-sql-files-into-mysql) – Rahil Wazir Feb 21 '15 at 21:20
  • @RahilWazir Thank you for your comment. I am using xampp and not wamp. Possible it is the same process but I don't know to use the MySQL command line like the accepted answer mentions. Any help could be more than helpful and welcome. Thank you. – user3456789 Feb 21 '15 at 21:26
  • You can run that command from windows command prompt (cmd) by navigating to your `\xampp\mysql\bin` folder. Make sure you change the parameters and specify correct path to your `database.sql` file – Rahil Wazir Feb 21 '15 at 21:31

1 Answers1

0

You can try using command prompt by using the below command

mysql -u username -p database_name < file.sql Enter then enter the password

It must work for large sql file.

Nishant Nair
  • 1,999
  • 1
  • 13
  • 18