phpmyadmin quot;no data received to importquot; error, how to fix?(phpmyadmin“未收到要导入的数据错误,如何修复?)
问题描述
我在电脑上使用 XAMPP 来托管数据库.我使用 phpmybackuppro 导出了备份(bintra.sql").我在家里的 mac 上使用 xampp,当我尝试导入位于桌面上的 sql 文件时,出现此错误.
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.
现在,bintra.sql 的文件大小为 922kb.phpmyadmin 屏幕上显示的最大允许大小为 3,072KiB,所以我认为这不是阻止导入的大小.
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.
我使用的是 phpmyadmin v2.11.7
I'm using phpmyadmin v2.11.7
有没有人知道为什么没有收到要导入的数据?
Does anyone have any ideas why no data is being received to import?
评论回复:
这些是我从 php.ini 上传的设置
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
尝试改用 Mamp.使用相同的 sql 文件可以正常工作.我不知道为什么.
Tried using Mamp instead. Works fine with the same sql file. I don't know why.
推荐答案
我在 Windows 上遇到了同样的问题.原来它是由 PHP 用于上传的临时目录引起的.默认为 C:WindowsTemp,PHP 不可写.
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:WindowsTemp, which is not writable for PHP.
在php.ini中,添加:
In php.ini, add:
upload_tmp_dir = C:inetpub emp
确保删除任何其他 upload_tmp_dir
设置.在 C:inetpub emp
上设置权限,以便 IUSR
和 IIS_IUSRS
具有写入权限.重启网络服务器,你应该没问题.
Make sure to remove any other upload_tmp_dir
settings. Set permissions on C:inetpub emp
so IUSR
and IIS_IUSRS
have write permission. Restart the web server and you should be fine.
这篇关于phpmyadmin“未收到要导入的数据"错误,如何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:phpmyadmin“未收到要导入的数据"错误,如何修复?
基础教程推荐
- SQL Server 2016更改对象所有者 2022-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01