简体   繁体   English

Magento错误:SQLSTATE [HY000]:一般错误:1

[英]Magento error: SQLSTATE[HY000]: General error: 1

I hope this question is ok for Stack Overflow – If it's not appropriate then let me know and I'll remove if that's the case. 我希望这个问题适用于Stack Overflow - 如果它不合适那么请告诉我,如果是这样的话,我会删除。

Magento has been recently giving me the following error when I visit the shop on a windows machine: 当我在Windows机器上访问商店时,Magento最近给了我以下错误:

SQLSTATE[HY000]: General error: 1 Can't create/write to file 'C:\\WINDOWS\\TEMP#sql_ac0_0.MYI' (Errcode: 17) SQLSTATE [HY000]:常规错误:1无法创建/写入文件'C:\\ WINDOWS \\ TEMP#sql_ac0_0.MYI'(错误代码:17)

I have ensured I am using a database user with all permissions. 我确保我使用具有所有权限的数据库用户。

The thing that baffles me about the error is its reference to C:\\WINDOWS\\TEMP … as that's a local file on the windows machine. 让我对错误感到困惑的是它对C:\\ WINDOWS \\ TEMP的引用......因为这是Windows机器上的本地文件。 May I add that the issue only ever appears when I'm testing on windows machines, and not on my Mac. 我可以补充说,这个问题只出现在我在Windows机器上测试时,而不是在我的Mac上。

The machines I test on all have cookies enabled. 我测试的机器都启用了cookie。

What function of Magento requires to write to the user's PC apart from leaving a cookie? Magento除了留下cookie之外还需要写入用户PC的哪些功能? (and even if it is just a cookie, why should it break the site?) (即使它只是一个cookie,它为什么要破坏网站?)

Probably you installed Magento in a folder without write permissions. 可能你在没有写权限的文件夹中安装了Magento。 This is a mySQL error not a PHP one. 这是一个mySQL错误而不是PHP错误。

People from Magento have a forum entry about this. 来自Magento的人有关于此的论坛条目 The solution is to change permissions though MAMP or whatever server you use to read and write for folders and files 解决方案是通过MAMP或用于读取和写入文件夹和文件的任何服务器来更改权限

For anyone finding this thread, I experienced the same thing, and found none of the answers on the internet solved the problem. 对于找到这个帖子的人来说,我经历了同样的事情,发现互联网上的答案都没有解决问题。

The problem that I found was that the we had reached our storage space (hard-drive) limit on our server, which was causing the problem. 我发现的问题是我们已经达到了我们服务器上的存储空间(硬盘驱动器)限制,这导致了问题。

After going through and deleting some large files (our historical backups), the problem went away, and the site worked properly. 在浏览并删除一些大型文件(我们的历史备份)之后,问题就消失了,并且网站正常运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM