0

I couldn't import a 2gb dump into phpmyadmin even after changing the default values in .ini file. How to import 2gb sql file through command line into phpmyadmin. Please help me with this.

Wikii Rakesh
  • 1
  • 1
  • 3

4 Answers4

0

Use this way in your command line

mysql -u db_username -p db_password < backup_name.sql
Wazan
  • 539
  • 1
  • 8
  • 27
0

Rakesh, this kind of issue is already answered on this post, you can try the same.

How to Import 1GB .sql file to WAMP/phpmyadmin

Community
  • 1
  • 1
Ram Sharma
  • 8,676
  • 7
  • 43
  • 56
0

Have you done all the commands in the php.ini file

  • post_max_size = 2048M
  • upload_max_filesize = 2048M
  • max_execution_time= 5000
  • max_input_time = 5000
  • memory_limit = 2048M

Leaving out even one of them will cause a problem while importing.

ZInj
  • 341
  • 2
  • 9
0

If you are not familiar with the mysql.exe command line tool then the simplest and most unobtrusive solution is to make these changes to your \wamp\alias\phpmyadmin.conf file. Then these changes are only going to effect phpmyadmin and not your whole server.

Add these PHP config changes just before the </Directory> line

  ## Allow phpmyadmin to load large backups 
  ## and run for long enough to process the large file

  php_admin_value upload_max_filesize 2100M
  php_admin_value post_max_size 2100M
  php_admin_value max_execution_time 1200
  php_admin_value max_input_time 1200
</Directory>
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149