Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2766535
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类: LINUX

2011-11-05 22:28:15

客户投诉说自己的网站链接不上db,提示见附件

This error can happen when the client is attempting an initial connection to the server. If your connect_timeout value is set to only a few seconds, you may be able to resolve the problem by increasing it.

Solution

Before increasing the value of connect_timeout, first determine its current value. This can be done by executing the following SQL statement:

SHOW VARIABLES LIKE 'connect_timeout';
我的显示为5 

Normally, setting this variable to ten seconds would be sufficient. You might want to set it to more than ten seconds if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by using the following SQL statement:

SHOW STATUS like 'aborted_connections';

This statement usually will return an empty set. However, if you have been experiencing aborted connections, the value will increase by one for each initial connection attempt that the server aborts.

To change this value of connect_timeout, you can use the SET statement. You will need SUPER privileges.

SET GLOBAL connect_timeout = 20;
 
还有其他的可能性:
1:
2:
3:
4:
5:
6:
有时候重启网卡就可以了!
阅读(1783) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~