tags:

views:

40

answers:

3

Hi

I am trying to import a sql file which is more than 10 MB. But i can't do it.

Its there any way to import a file which is more than 10MB using MYSQL.

EDIT:

I am having a mysql dump file which is more than 10MB. I can't able to import it in my localhost. While i do the following error is occured.

ERROR: You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.

Thanks in advance.

A: 

You should to do it via the commandline (since you wrote localhost above, I assume you have access). It has no timelimit for imorting data.

mysql -u username -p database < location/to/your/dump.sql

-p will ask you for your password, if the user has no password, ignore the flag

edit: Reading the comment from Marco Mariani: this is a possibility, but kep in mind that this limit will be used for ALL of your PHP applications on the same server (except you change it back after the import but that's rather tedious) and a upload limit set too high is not a good idea IMO.

DrColossos
A: 

This happens because you are using php/phpmyadmin.

You can change the max_upload setting in php.ini (or do it from the command line)

Marco Mariani
A: 

You can use SQLyog to import the data in mysql. There is no 10MB limit (from php.ini using phpmyadmin)

laurent-rpnet