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“未收到要导入的数据"错误,如何修复?
基础教程推荐
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 无法解决整理冲突 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
