Importing a large BLOB file into MySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
emmbec
Forum Contributor
Posts: 112
Joined: Thu Sep 21, 2006 12:19 pm
Location: Queretaro, Mexico

Importing a large BLOB file into MySQL

Post by emmbec »

Hi everyone, I am having problems trying to move my DB information to another server. I am using MySQL, and currently I have a lot of information (Plain Text) which I can seem to dump and insert in another DB, but there is one table which stores some Excel file, each file holding 600Kb, and I have 200 records (you do the math). Now that is a lot of information and for some reason I am just not able to import it using PHPMYADMIN into my other server. I have even tried creating a dump with only 3 records and I still cannot import it, I get a:

Fatal error: Maximum execution time of 300 seconds exceeded in D:\xampp\phpMyAdmin\libraries\string_mb.lib.php on line 47

Can anyone help me please, I just don't know what to do anymore to import that information, I am about to download each of the excel files through the application and insert each of them mannually into the other server....

Thanks a lot!
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Importing a large BLOB file into MySQL

Post by jaoudestudios »

You need to increase the execution time. I think it is in the php.ini file, I cant remember. If you change anything in the php.ini file for apache dont forget to restart apache. It looks like you are using WAMP, I am not sure how it works on windows but if you can import the dump through the command line you might avoid the Fatal error.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Importing a large BLOB file into MySQL

Post by JAB Creations »

The beautiful thing about MySQL when you have hands on access to the server: just copy the files to the MySQL database directory and restart the MySQL service. I did the same thing with Windows 98 and two hard drives back in the day when it would go bad. I'd just book from D:\ and copy over the bad copy on C:\. But importing large amounts of MySQL data in all other circumstances has never been fun for me.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Importing a large BLOB file into MySQL

Post by Eran »

For importing such large dumps of SQL I would go directly to the shell and run it from there. This will not only be faster, but it will have none of PHP's memory and runtime limitations.
Post Reply