Shaun
Shaun

Reputation: 31

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.

Magento has been recently giving me the following error when I visit the shop on a windows machine:

SQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘C:\WINDOWS\TEMP#sql_ac0_0.MYI’ (Errcode: 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. May I add that the issue only ever appears when I’m testing on windows machines, and not on my Mac.

The machines I test on all have cookies enabled.

What function of Magento requires to write to the user’s PC apart from leaving a cookie? (and even if it is just a cookie, why should it break the site?)

Upvotes: 3

Views: 3235

Answers (2)

random_user_name
random_user_name

Reputation: 26160

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.

Upvotes: 1

Elzo Valugi
Elzo Valugi

Reputation: 27866

Probably you installed Magento in a folder without write permissions. This is a mySQL error not a PHP one.

People from Magento have a forum entry about this. The solution is to change permissions though MAMP or whatever server you use to read and write for folders and files

Upvotes: 1

Related Questions