Resolve Can "t create and write file" sql_5c0_0.MYD "problem
- 2020-05-27 07:20:35
Today I went to the management of the website background, login prompt
MySQL error:Can't create/write to file '#sql_5c0_0.MYD'
MySQL server error:
Can't create/write to file 'C:/WINDOWS/TEMP/#sql_a80_0.MYD' (Errcode: 17) ( 1 )
According to the online search tips and their own situation analysis, the solution is as follows:
The problem occurred because the server environment did not allow database validation and could not do so.
Solutions and reasons:
1. Permissions: C:/WINDOWS/TEMP folder permissions are not enough. At least, the readable and writable permissions of USERS group should be given, or the permissions of everyone group should be given.
2, the file is too big C:/WINDOWS/TEMP folder disk full, the file can not write in, this time empty temp folder data; Or delete the file # sql_2250_0.MYD (this file must still be deleted if you follow the steps below);
Note: however, this is not the ultimate solution. If the server has McAfee installed, you must perform the following steps to solve this problem
3. Anti-virus software McAfee
3.1. The access protection Settings of McAfee are modified to allow the files of TEMP to be writable;
3.2 access scan problem of McAfee open McAfee and check off the scan file (when writing to disk) by accessing scan properties - all processes - detection items;
4. Can't create/write to file 'C:/WINDOWS/TEMP/# sql_5c0_0.MYD '
Add 1 line in my. ini [mysqld]
Specify a directory to create temporary files that will be used for many queries
Restart the mysql service to take effect.
Open the McAfee VirusScan console -
Press access scanner -
All processes -
Test item -
Exclude items -
Add D: / mysql/temp /
Exclude time selection read write time.
Note: since the default temporary directory for mysql is c:/windows/temp, it is widely believed that
Modify McAfee VirusScan console - > Press access scanner - > Property - > All processes - > Test item - > When scanning a file to remove a written file,
My method is relatively safe.
As for permissions, since mysql service defaults to system permissions,1 is generally under the complete control of the system and can be given to a startup user if necessary.