内容 |
最近网站访问量大增,可能有些频道程序也有一些问题,造成了MySQL数据库出现Forcing close of thread 28790 user错误。如果遇到这种情况改怎么解决呢?icech找到两种方法来解决: 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的服务并双击,点击恢复选项卡。  第一次失败:默认是“不操作”,改成"重新启动服务"。 在下方的“重新启动服务:()分钟后”添上“0”表示如果服务意外终止则立即重启动。 点击确定使设置生效。 但是有个问题产生了:如果这样进行修改,在任务管理器里无法结束mysql-nt进程。所有如果需要停止进程,先改回来再操作即可。 |