Hi there. I just received the following error on my restaurant's drupal-based website:
" * One or more problems were detected with your Drupal installation. Check the status report for more information.
* user warning: Can't create/write to file 'c:\windows\temp\#sql_a4c_0.MYD' (Errcode: 17) query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = 'giordani' AND b.status = 1 AND (r.rid IN (2) OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in C:\www\brotherstwo.ca\htdocs\modules\block\block.module on line 407.
Any ideas???? Kind of an emergency! Thanks so much for any help!
Justin
Comments
Comment #1
fractile81 commentedYou appear to be having a problem with MySQL, not Drupal. MySQL is saying it cannot write to that directory. Are you able to query the MySQL server directly (e.g. PHPMyAdmin, or MySQL Query Browser)?
Have you tried restarting your MySQL service?
Comment #2
ainigma32 commentedError 17 means that MySQL is trying to create a temporary file that already exists.
So stop the MySQL service. Remove the contents from c:\windows\temp (some items may be in use, just skip those)
Start the MySQL service and you should be good to go.
Please post back your findings.
- Arie
Comment #3
ainigma32 commentedLooks like jadoiron won't be posting any feedback so I'm setting this to fixed.
Feel free to reopen if you think that is wrong.
- Arie
Comment #4
Ether commentedIt's not fixed. I understand that this is MySQL error. But how to solve it ?
My temp folder excluded from antivirus scanning, permision is set to full access for everybody, including system. And what I get is
user warning: Can't create/write to file 'W:\WEB\Temp\#sql_1304_0.MYD' (Errcode: 17) query: SELECT t.* FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE r.vid = 170 ORDER BY v.weight, t.weight, t.name in W:\WEB\htdocs\modules\taxonomy\taxonomy.module on line 618.
After that only restart of MySQL server helps.
Any suggestions ?
Comment #5
ainigma32 commentedYou could try creating a temp directory especially for MySQL and pointing to it in my.ini
Also exclude that directory from the virusscanner to avoid locking and make sure MySQL has sufficient permissions.
Please post back how that works for you.
- Arie
Comment #6
Ether commentedThanks ainigma32.
Only Drupal using W:/Web/Temp folder, and, as I wrote before, it is excluded from virus scan. And it present in my.ini as tmpdir=W:/web/temp
Added.
Now I have increased InnoDB log file size (from 27 M to 256 M). Looks better. No errors yet. Will see what will happend after weekend.
Comment #7
Ether commentedSo, looks like this problem solved, FOR ME. No more Can't create/write errors.
Comment #8
ainigma32 commentedGood to hear.
- Arie
Comment #10
Ether commentedGot it back.
Interesting that when this happening *.myd file's size always the same - 17872 bytes.
Comment #11
Ether commentedThe problem disappear when I fixed problem with cron.
Comment #12
Coldice4678 commented#11 @Ether, best fix. I had the same errors, tried messing with the mysql server. But it was simply I need to load cron.php (when moving servers I happen to forget to reset its hourly ping, so I guess it got backed up)
Comment #13
geshan commentedwhat is the best solution for this I'm also getting the same problem.
Comment #14
mattyoung commentedI'm getting this error. The error message is:
At first even issuing a 'describe' command in mysql would come back with the same "Can't create/write to file '/tmp/#sql_3746_0.MYD' (Errcode: 17)."
For example, I do this in mysql:
and I get this error. Then I run this in mysql:
Now mysql is okay, I can do the 'describe'. I can even run the same failed query from the Drupal error message. I just type the exact same query (switching to the right database first). But browsing my site still show the same error.
I would think once the query can run in mysql, the Drupal should be okay. But drupal continue to have the error.
I have seen this error several times now. Sometime the file '/tmp/#sql_3746_0.MYD' is there. Sometime that file is not.
The problem clear up after I run cron.php.
I'm running on a Linux host. There should be file permission to the /tmp dir.
Comment #15
dpearcefl commentedPlease don't hijack an issue. Open you own issue.