phpmyadmin“无数据接收导入”错误,如何修复?

时间:2021-09-09 16:13:27

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.

我正在pc上使用XAMPP托管数据库。我使用phpmybackuppro导出了一个备份(“bin .sql”)。我在家里的mac上使用xampp,当我尝试导入位于桌面的sql文件时,我得到了这个错误。

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.

现在,bintra的文件大小。sql是922 kb。phpmyadmin屏幕上允许的最大大小是3,072KiB,所以我认为阻止导入的不是这个大小。

I'm using phpmyadmin v2.11.7

我用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

这些是我从ph .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.

试着用Mamp代替。使用相同的sql文件可以正常工作。我不知道为什么。

8 个解决方案

#1


16  

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.

我在Windows上遇到了同样的问题。原来是PHP用于上传的临时目录引起的。默认这是C:\Windows\ Temp,这不是可写为PHP。

In php.ini, add:

在php中。ini,添加:

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.

确保删除任何其他upload_tmp_dir设置。设置C:\inetpub\temp上的权限,以便IUSR和IIS_IUSRS有写权限。重新启动web服务器应该没问题。

#2


49  

I HAD THE SAME PROBLEM AND THIS WORKED FOR ME :

我遇到了同样的问题,这对我很有效:

Try these different settings in C:\wamp\bin\apache\apache2.2.8\bin\php.ini

Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

Then restart your xampp or wamp to take effect

然后重新启动xampp或wamp以生效

or stop then start only apache in xammp

或者在xammp中只启动apache

#3


7  

Check permissions for you upload directory. You can find its path inside /etc/phpmyadmin/apache.conf file.

检查上传目录的权限。您可以在/etc/phpmyadmin/ apache.中找到它的路径conf文件。

In my case (Ubuntu 14.04) it was:

在我的例子中(Ubuntu 14.04)是:

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.

所以我检查了/var/lib/phpmyadmin/tmp的权限,结果发现这个目录不是我的Apache用户可写的(默认情况下是www-data)。这种情况可能会发生,尤其是如果您像我一样更改了apache用户。

#4


4  

Open your php.ini file use CNTRL+F to search for the following settings which may be the culprit:

打开你的php。ini文件使用CNTRL+F搜索以下设置可能是罪魁祸首:

  • file_uploads
  • file_uploads
  • upload_max_filesize
  • upload_max_filesize
  • post_max_size
  • post_max_size
  • memory_limit
  • memory_limit
  • max_input_time
  • max_input_time
  • max_execution_time
  • max_execution_time

Make sure to save a copy of the php.ini prior to making changes. You will want to adjust the settings to accommodate your file size, and increase input and/or execution time.

确保保存php的一个副本。在进行更改之前进行ini操作。您将需要调整设置以适应您的文件大小,并增加输入和/或执行时间。

Remember to restart your services after making changes.

记住,在进行更改后重新启动服务。

Warning! There may be some unforeseen drawbacks if you adjust these settings too liberally. I am not expert enough to know this for sure.

警告!如果您太随意地调整这些设置,可能会有一些无法预见的缺陷。我不太了解这一点。

Source: http://forum.wampserver.com/read.php?2,20757,20935

资料来源:http://forum.wampserver.com/read.php?2,20757年,20935年

#5


1  

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:

我从未成功地使用phpmyadmin或phpMyBackupPro导入哑文件,更好的方法是访问控制台或命令行(无论在mac中叫什么),然后执行以下操作:

mysql -u username -p databasename

mysql -u用户名-p数据库名

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

用连接到mysql的用户名替换用户名,然后它会要求您输入该用户名的密码,仅此而已

you can import any size of dumb using this method

您可以使用此方法导入任何大小的dumb

#6


1  

If you are using xampp you can find php.ini file by going into xampp control panel and and clicking config button in front of Apache.

如果您正在使用xampp,您可以找到php。通过进入xampp控制面板和在Apache前面单击config按钮来实现ini文件。

#7


1  

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.

没有收到要导入的数据。要么没有提交文件名,要么文件大小超过PHP配置允许的最大大小。看到1.16 FAQ。

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".

在这里,您可以设置任何可以保存temp文件的目录,我已经安装在D: drive xampp中,所以我将它设置为“D:\xampp\xampp\tmp”。

#8


0  

just copy your source DataBase(from your PC C:\xampp\mysql\data\"your data base"), then copy it to the destination folder in your MAC (/Application/Xampp/xamppfiles/var/mysql).

只要拷贝你的源数据库(从你的PC C:\xampp\mysql\数据\“你的数据库”),然后拷贝到你MAC的目标文件夹(/Application/ xampp /xamppfiles/var/mysql)。

don't forget to set the permission of the new copied folder(your DataBase) in your MAC otherwise you can't see your tables!

不要忘记在你的MAC中设置新的复制文件夹(你的数据库)的权限,否则你看不到你的表格!

to set the permission: -go to the folder of your DataBase(/Application/Xampp/xamppfiles/var/mysql/"your data base") -right click on it -select Get info -in the sharing&permissions you must add your user account(i.e. administrator or everyone) -choose its privilege to Read & Write -choose Apply to enclosed items

要设置权限:-进入数据库的文件夹(/Application/Xampp/xamppfiles/var/mysql/"your data base") -右键单击它-选择获取信息-在sharing&permissions中,您必须添加您的用户帐户(即。管理员或所有人)-选择读和写的特权-选择应用于所附的项目

enjoy your Database ;)

享受你的数据库。)

#1


16  

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.

我在Windows上遇到了同样的问题。原来是PHP用于上传的临时目录引起的。默认这是C:\Windows\ Temp,这不是可写为PHP。

In php.ini, add:

在php中。ini,添加:

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.

确保删除任何其他upload_tmp_dir设置。设置C:\inetpub\temp上的权限,以便IUSR和IIS_IUSRS有写权限。重新启动web服务器应该没问题。

#2


49  

I HAD THE SAME PROBLEM AND THIS WORKED FOR ME :

我遇到了同样的问题,这对我很有效:

Try these different settings in C:\wamp\bin\apache\apache2.2.8\bin\php.ini

Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

Then restart your xampp or wamp to take effect

然后重新启动xampp或wamp以生效

or stop then start only apache in xammp

或者在xammp中只启动apache

#3


7  

Check permissions for you upload directory. You can find its path inside /etc/phpmyadmin/apache.conf file.

检查上传目录的权限。您可以在/etc/phpmyadmin/ apache.中找到它的路径conf文件。

In my case (Ubuntu 14.04) it was:

在我的例子中(Ubuntu 14.04)是:

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.

所以我检查了/var/lib/phpmyadmin/tmp的权限,结果发现这个目录不是我的Apache用户可写的(默认情况下是www-data)。这种情况可能会发生,尤其是如果您像我一样更改了apache用户。

#4


4  

Open your php.ini file use CNTRL+F to search for the following settings which may be the culprit:

打开你的php。ini文件使用CNTRL+F搜索以下设置可能是罪魁祸首:

  • file_uploads
  • file_uploads
  • upload_max_filesize
  • upload_max_filesize
  • post_max_size
  • post_max_size
  • memory_limit
  • memory_limit
  • max_input_time
  • max_input_time
  • max_execution_time
  • max_execution_time

Make sure to save a copy of the php.ini prior to making changes. You will want to adjust the settings to accommodate your file size, and increase input and/or execution time.

确保保存php的一个副本。在进行更改之前进行ini操作。您将需要调整设置以适应您的文件大小,并增加输入和/或执行时间。

Remember to restart your services after making changes.

记住,在进行更改后重新启动服务。

Warning! There may be some unforeseen drawbacks if you adjust these settings too liberally. I am not expert enough to know this for sure.

警告!如果您太随意地调整这些设置,可能会有一些无法预见的缺陷。我不太了解这一点。

Source: http://forum.wampserver.com/read.php?2,20757,20935

资料来源:http://forum.wampserver.com/read.php?2,20757年,20935年

#5


1  

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:

我从未成功地使用phpmyadmin或phpMyBackupPro导入哑文件,更好的方法是访问控制台或命令行(无论在mac中叫什么),然后执行以下操作:

mysql -u username -p databasename

mysql -u用户名-p数据库名

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

用连接到mysql的用户名替换用户名,然后它会要求您输入该用户名的密码,仅此而已

you can import any size of dumb using this method

您可以使用此方法导入任何大小的dumb

#6


1  

If you are using xampp you can find php.ini file by going into xampp control panel and and clicking config button in front of Apache.

如果您正在使用xampp,您可以找到php。通过进入xampp控制面板和在Apache前面单击config按钮来实现ini文件。

#7


1  

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.

没有收到要导入的数据。要么没有提交文件名,要么文件大小超过PHP配置允许的最大大小。看到1.16 FAQ。

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".

在这里,您可以设置任何可以保存temp文件的目录,我已经安装在D: drive xampp中,所以我将它设置为“D:\xampp\xampp\tmp”。

#8


0  

just copy your source DataBase(from your PC C:\xampp\mysql\data\"your data base"), then copy it to the destination folder in your MAC (/Application/Xampp/xamppfiles/var/mysql).

只要拷贝你的源数据库(从你的PC C:\xampp\mysql\数据\“你的数据库”),然后拷贝到你MAC的目标文件夹(/Application/ xampp /xamppfiles/var/mysql)。

don't forget to set the permission of the new copied folder(your DataBase) in your MAC otherwise you can't see your tables!

不要忘记在你的MAC中设置新的复制文件夹(你的数据库)的权限,否则你看不到你的表格!

to set the permission: -go to the folder of your DataBase(/Application/Xampp/xamppfiles/var/mysql/"your data base") -right click on it -select Get info -in the sharing&permissions you must add your user account(i.e. administrator or everyone) -choose its privilege to Read & Write -choose Apply to enclosed items

要设置权限:-进入数据库的文件夹(/Application/Xampp/xamppfiles/var/mysql/"your data base") -右键单击它-选择获取信息-在sharing&permissions中,您必须添加您的用户帐户(即。管理员或所有人)-选择读和写的特权-选择应用于所附的项目

enjoy your Database ;)

享受你的数据库。)