PDA

View Full Version : Importing large files into mysql with phpmyadmin



b0nd
09-25-2012, 03:25 PM
phpMyAdmin provides few options to import database files but generally limited to 2Mb in size.
Through sql command line it's possible to import gigs of db file.

To do the same using phpMyAdmin:

open /etc/phpmyadmin/config.inc.php
look for line $cfg['UploadDir'] = ' ';

edit it to $cfg['UploadDir'] = 'upload';
save the file and exit

Go to /usr/share/phpmyadmin
create a directory named 'upload'

Put your big db file in newly created upload directory, browse to phpmyadmin and find the new option under "import' - "Select from the web server upload directory ... "

Cheers!

PS: I am no db expert. It would be appreciable if people share their hacks in this thread on the same.

neo
09-26-2012, 03:17 PM
Its good trick but I think it might hamper the database performance.

Anant Shrivastava
09-26-2012, 09:16 PM
If i remember correctly phpmyadmin supports gzip compressed files. not sure but for static text files compression ratio is very good.

b0nd
09-27-2012, 09:51 AM
Its good trick but I think it might hamper the database performance.
Not sure, but wondering why it would?

Cheers!

jain123
12-14-2012, 09:15 PM
nice bond i will try but i think using this it may cause the database harm.