Wednesday 31 October 2018

Mysql: phpmyadmin “no data received to import” error, how to fix?


I am using XAMPP on a pc atwork to host a database. I exported a backup ("bintra.sql") using phpmybackuppro. I use xampp on a mac at home, and when I try to import the sql file located on my desktop, I get this error.
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.
Now, the file size of bintra.sql is 922kb. The max size allowed indicated on the phpmyadmin screen is 3,072KiB, so I don't think it is the size that is preventing the import.
I'm using phpmyadmin v2.11.7
Does anyone have any ideas why no data is being received to import?
Comment Responses:
These are my upload settings from php.ini
;Whether to allow HTTP file uploads.
file_uploads = On
;Temporary directory for HTTP uploaded files (will use system default if not specified). 
//upload_tmp_dir =
;Maximum allowed size for uploaded
files. 

upload_max_filesize = 3M
;Maximum size of POST data that PHP will accept.
post_max_size = 8M
EDIT:
Tried using Mamp instead. Works fine with the same sql file. I don't know why.

 Answers



I had the same problem on Windows. Turns out it was caused by the temporary directory PHP uses for uploads. By default this is C:\Windows\Temp, which is not writable for PHP.
In php.ini, add:
upload_tmp_dir = C:\inetpub\temp
Make sure to remove any other upload_tmp_dir settings. Set permissions on C:\inetpub\temp so IUSR and IIS_IUSRS have write permission. Restart the web server and you should be fine.




Check permissions for you upload directory. You can find its path inside /etc/phpmyadmin/apache.conf file.
In my case (Ubuntu 14.04) it was:
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
So I checked permissions for /var/lib/phpmyadmin/tmp and it turns out that the directory wasn't writable for my Apache user (which is by default www-data). It could be the case especially if you changed your apache user like I do.




I never succeeded importing dumb files using phpmyadmin or phpMyBackupPro better is to go to console or command line ( whatever it's called in mac ) and do the following:
mysql -u username -p databasename
replace username with the username you use to connect to mysql, then it will ask you to enter the password for that username, and that's it
you can import any size of dumb using this method




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.
These are my upload settings from php.ini
upload_tmp_dir = "D:\xampp\xampp\tmp"       ;//set these for temp file storing

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 10M    ;//change it according to max file upload size
I am sure your problem will be short out using this instructions.
 upload_tmp_dir = "D:\xampp\xampp\tmp"
Here you can set any directory that can hold temp file, I have installed in D: drive xampp so I set it "D:\xampp\xampp\tmp".

0 comments:

Post a Comment