MySQL运行时候报告 Can't create/write to file xxx

问题
MySQL运行时候报告 Can't create/write to file xxx

解决方案
这个问题通常发生在windows系统上,是由于mysql没有指定默认的temp临时目录造成的

解决方法:
修改mysql的配置文件my.cnf
找到[mysqld]一段:
加入如下一行:
tmpdir=C:/temp (注意,路径的/是unix风格的,不是windows的\风格)

然后确认C:\temp目录要有mysql的写入权限
重启MySQL,即可

posted @ 2020-01-12 21:01  sfqas  阅读(6069)  评论(0)    收藏  举报