MySQL错误Forcing,close,of,thread的两种解决方法|endthreadex

1、修改mysql配置文件

如果配置文件是my.ini,可以在在my.ini添加下面两条内容:

skip-locking

skip-name-resolve

注意:在新版本的mysql中,skip-locking已经被换成了skip-external-locking,如果使用skip-locking,可能会报如下错误:

[Warning] "--skip-locking" is deprecated and will be removed in a future release. Please use "--skip-external-locking" instead.

要注意查看日志。所以新版本mysql的写法应该是:

skip-external-locking

skip-name-resolve

2、在mysql服务中进行设置

开始菜单 -> 运行 -> services.msc,找到mysql的服务并双击,点击恢复选项卡。

MySQL错误Forcing close of thread的两种解决方法1

第一次失败:默认是“不操作”,改成"重新启动服务"。

在下方的“重新启动服务:()分钟后”添上“0”表示如果服务意外终止则立即重启动。

点击确定使设置生效。

但是有个问题产生了:如果这样进行修改,在任务管理器里无法结束mysql-nt进程。所有如果需要停止进程,先改回来再操作即可。