Page 1 of 4

Cannot Upload .sql into phpMyAdmin

Posted: Tue Oct 29, 2013 7:53 pm
by fast11
Hello VestaCP community,

I have been trying to import my database into php. On most attempts I am getting the following error message:
"No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16."

In other instances phpMyAdmin stops responding and shows a 505 internal server error.

Could you please guide me on how to resolve this issue.

Thank you!

Re: Cannot Upload .sql into phpMyAdmin

Posted: Wed Oct 30, 2013 12:25 pm
by skid
Most probably dump size exceed default php limits. Try to increase post_max_size and upload_max_filesize values. I guess 64M should be enough.
Open /etc/php5/apache2/php.ini and set

Code: Select all

post_max_size = 64M
upload_max_filesize = 64M
Then restart the apache.

Code: Select all

apachectl restart
If you are using CentOS or RHEL, then the php.in location is /etc/php.ini

Re: Cannot Upload .sql into phpMyAdmin

Posted: Wed Oct 30, 2013 7:33 pm
by fast11
skid wrote:Most probably dump size exceed default php limits. Try to increase post_max_size and upload_max_filesize values. I guess 64M should be enough.
Open /etc/php5/apache2/php.ini and set

Code: Select all

post_max_size = 64M
upload_max_filesize = 64M
Then restart the apache.

Code: Select all

apachectl restart
If you are using CentOS or RHEL, then the php.in location is /etc/php.ini
It worked. Thanks for your help. Looking forward to test vestacp and may use it in a production environment.

Re: Cannot Upload .sql into phpMyAdmin

Posted: Mon Dec 16, 2013 2:49 pm
by Fenkins
I got the same situation explained in starting post, but changes in php.ini wont give me any positive result, except my phpMyAdmin panel now tells me that I got 64mb file upload limit.
I also tried to set the tmp folder manually and set permissions to 777 ( I am running ubuntu 12.04.03 if that matters) and still no luck.
Any comments?

As a temporary solution I used import from terminal:
From the mysql console:

Code: Select all

mysql> use DATABASE_NAME;
mysql> source path/to/file.sql;
But phpMyAdmin still aint work for import... Dont feel good about it.

Re: Cannot Upload .sql into phpMyAdmin

Posted: Wed Dec 18, 2013 9:21 pm
by skid
I hope this how-to will help you?

Re: Cannot Upload .sql into phpMyAdmin

Posted: Thu Dec 26, 2013 10:10 am
by Kaurer
Hello,

I have the same problem.

I have configured:
post_max_size = 64M
upload_max_filesize = 64M

I have also:
upload_tmp_dir = /tmp

apachectl restart

But nothing works.

Any tips?

Thank you.

Re: Cannot Upload .sql into phpMyAdmin

Posted: Thu Dec 26, 2013 12:46 pm
by demian
Kaurer wrote:Hello,

I have the same problem.

I have configured:
post_max_size = 64M
upload_max_filesize = 64M

I have also:
upload_tmp_dir = /tmp

apachectl restart

But nothing works.

Any tips?

Thank you.

what dump size?

if more 64Mb
increase more post_max_size and upload_max_filesize in php.ini

if not
increase max_allowed_packet

could be fix it

Re: Cannot Upload .sql into phpMyAdmin

Posted: Thu Dec 26, 2013 3:05 pm
by Kaurer
@demian, the file size is only 400 Kb.

Re: Cannot Upload .sql into phpMyAdmin

Posted: Thu Dec 26, 2013 6:29 pm
by grainga
The only way I have been able to import databases is via ssh.

mysql -u (username) -p (database name ) < /path/to/sql/on/server
then enter user password when prompted.

Re: Cannot Upload .sql into phpMyAdmin

Posted: Fri Dec 27, 2013 4:42 pm
by Kaurer
grainga wrote:The only way I have been able to import databases is via ssh.

mysql -u (username) -p (database name ) < /path/to/sql/on/server
then enter user password when prompted.
To get out of trouble is good, but the good solution would be to do it from phpMyadmin.

Thanks for your comment.