0

I am trying to import a 5MB file in phpMyadmin.

When I follow the normal procedure of importing it just makes me wait and nothing is happening. Since yesterday morning that file is getting imported and it shows that moving circle sign above the browse.

Now when I followed the other method -

1 C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php

2 Find the line with $cfg['UploadDir'] on it and update it to:

3 $cfg['UploadDir'] = 'upload';

4 Create a directory called ‘upload’ within the phpmyadmin directory.

5 C:\wamp\apps\phpmyadmin3.2.0.1\upload\

I got this error -

Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\apps\phpmyadmin3.5.1\libraries\import\sql.php on line 135

I checked the C:\wamp\apps\phpmyadmin3.5.1\libraries\import\sql.php file but couldn't find anything like 300 or execution time. Guys pls help me with how can I import this %MB file fast so that I can proceed with my tool development !!

Learning
  • 198
  • 1
  • 11

4 Answers4

3

Try this solution:Use below command

mysql -u root -p dbname
use dbname;
mysql> SHOW DATABASES;
mysql> show tables;
SOURCE path (D:/your_file_name.sql); // please give correct path
Nikunj Kabariya
  • 840
  • 5
  • 14
0

Use mysql console to import large sql file.

Type the below command in mysql console:

SOURCE "Path of your file located and mention your file name"

For Ex: SOURCE C:\Users\test\Desktop\.sql

OR : Update the value in php.ini

upload_max_filesize=128M
post_max_size = 128M
max_execution_time = 300  
max_input_time = 300

Thanks

ahalya
  • 184
  • 1
  • 10
0

I think you are using windows OS. So following step may solve your problem

  1. Open cmd.
  2. Navigate mysql installation directory [type command cd "C:\wamp\bin\mysql\mysql5.6.12(May be different version)\bin"]

  3. now write command mysql -u <user> -p <password> <dbmame> < C:/path/of/file.sql

This trick work for me.

Paresh Thummar
  • 933
  • 7
  • 20
-3

Ensure that these options match your needs in php.ini file

upload_max_filesize=2M
max_execution_time=300
post_max_size=8M
makallio85
  • 1,366
  • 2
  • 14
  • 29