tags:

views:

64

answers:

4

Hey folks, I am trying to import a database (.sql) file using phpmy admin on a clients server.

I get a file too large error even thought I have the option to break the file into pieces etc but I still get the error. The upload size is 50MiB and the file I am trying to import is 90mb (for the db.)

I had the same error in MAM and know I could change the maz_size_limit and similar things, but I am not sure what to do on the clients server. I have access to the cpanel but can not see any options.

I can import the same file on my server, even though its set to 64MIB,as it is able to chop up and import.

What are my options here?

I tried to use mysequal pro as it worked for MAMP on my local comp but am not able to do it for this clients server.

Any ideas?

A: 

PHP usually has a file size restriction for uploads. Your best bet is to FTP the file and login through ssh and import the sql script through the mysql command line

pinkfloydx33
+1  A: 

Your best bet is to FTP it to the server and then ssh in (command line) and import the database that way. The resulting command will look something like:

mysql -hlocalhost -uUser -pPassword database_name < file_name

That way you can completely bypass any file upload or processing time restrictions.

CaseySoftware
A: 

What kind of access do you have to your client's server?

If you do have terminal access then the above answers will work.

Otherwise, a very ugly way to get it done is that you could create an .htaccess file to change PHP settings to get the sql file uploaded through PHPmyAdmin.

In your .htaccess file you would put:

php_value upload_max_filesize 80M
php_value post_max_size 80M
php_value max_execution_time 300
php_value max_input_time 300

Make sure you delete your .htaccess file as soon as you are done. Also, this will not work if your client's server is using Apache set not to allow overrides.

Kyle
A: 

Is the file you are trying to import in raw .sql form? If not, then try zipping/gzipping it. For text files, you can see HUGE reductions in file size, which might allow you to upload it without changing any PHP configuration files.

Joseph Redfern