Transferred from: http://x.discuz.net/viewthread-637544.htmlsolves a problem that has plagued me for a long time.
The reason is that during the backup process of the forum, no matter whether the discuz system tool is used for backup or the MySQL tool mysqldump is used for backup, the backup will always be interrupted and an error will occur:
SQL: Show fields from [Table] memberfields
Error: can't create/write to file 'd:/tmp/# SQL _d8c_0.myd '(errcode: 17)
Errno.: 1
Therefore, the database of the Forum has not been backed up for a long time, which is also a concern for me.
This time, we encountered data problems during the Forum transfer. First of all, I thought of copying the entire MySQL data directory. However, after copying, MySQL cannot be started, and I think it is copy. Then I tried to use the discuz System Tool and MySQL tool mysqldump for backup, but the above error still occurred.
I found a lot of information and found out that it was caused by the use of McAfee antivirus software. McAfee antivirus software blocked the process from reading and writing the file, one function of McAfee is to prevent programs from running and reading/writing from the temp directory. The solution is to edit "prohibit the public program from running files from the temp folder under" general standard protection "in" access protection "of McAfee, and write the policipolice.exe and mysqldump.exe" into the process to be excluded.
Now the two backups can be used.
However, due to the huge database size, I backed up more than 190 MB of data, which took too long to import and export, and often caused data errors. If it is an independent host, it is best to use the file copy method. Finally, we found that the reason why MySQL cannot be started after file copy is that default storage engine (InnoDB) is not available is incorrect. Delete ib_logfile0 and ib_logfile12 in the data directory under the MySQL installation directory, never delete ibdata1.