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.
Asked
Active
Viewed 3,265 times
0
-
are you using LINUX? – Mad Angle Aug 26 '14 at 05:33
-
No, I am using Windows – Wikii Rakesh Aug 26 '14 at 05:35
-
can you show what have you return in your .ini file – user3209031 Aug 26 '14 at 05:36
-
I'd think your web server would have something to say -- independently of PHP and myadmin -- about you posting a 2GB request. It's pretty common to set a much lower limit on request size in order to make it harder for some schmuck to DOS the server.You could probably up the limit, but i wouldn't keep it that way any longer than necessary. – cHao Aug 26 '14 at 05:36
-
cant you break the file and upload it ?? – user3209031 Aug 26 '14 at 05:39
-
Can you please help me importing with command line – Wikii Rakesh Aug 26 '14 at 05:40
-
No i cant break them – Wikii Rakesh Aug 26 '14 at 05:41
4 Answers
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.

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