Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpMyAdmin File too large error when trying to import sql

Tags:

phpmyadmin

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 64MB,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?

like image 714
Driftwood Avatar asked Oct 31 '10 02:10

Driftwood


Video Answer


2 Answers

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.

like image 160
KyleWpppd Avatar answered Oct 20 '22 15:10

KyleWpppd


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.

like image 39
CaseySoftware Avatar answered Oct 20 '22 16:10

CaseySoftware