[warning battery is critically low]Warning: mysql_connect() : 由于目标机器积极拒绝,无法连接

更新时间:2019-03-12    来源:mysql教程    手机版     字体:

【www.bbyears.com--mysql教程】


错误代码如下

aabb
Warning: mysql_connect() [function.mysql-connect]: [2002] 由于目标机器积极拒绝,无法连接。 (trying to connect via tcp://localhost:3306) in X:test7.php on line 6

Warning: mysql_connect() [function.mysql-connect]: 由于目标机器积极拒绝,无法连接。 in X:test7.php on line 6

Warning: mysql_select_db() [function.mysql-select-db]: [2002] 由于目标机器积极拒绝,无法连接。 (trying to connect via tcp://localhost:3306) in X:test7.php on line 7

Warning: mysql_select_db() [function.mysql-select-db]: 由于目标机器积极拒绝,无法连接。 in X:test7.php on line 7

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in X:test7.php on line 7

Warning: mysql_query() [function.mysql-query]: [2002] 由于目标机器积极拒绝,无法连接。 (trying to connect via tcp://localhost:3306) in X:test7.php on line 8

Warning: mysql_query() [function.mysql-query]: 由于目标机器积极拒绝,无法连接。 in X:test7.php on line 8

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in X:test7.php on line 8

Warning: mysql_query() [function.mysql-query]: [2002] 由于目标机器积极拒绝,无法连接。 (trying to connect via tcp://localhost:3306) in X:test7.php on line 14

Warning: mysql_query() [function.mysql-query]: 由于目标机器积极拒绝,无法连接。 in X:test7.php on line 14

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in X:test7.php on line 14

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in X:test7.php on line 15
Array ( )

程序代码很简单

 代码如下


$sql = "Select * from v_xyp where systype=5 ";
$array = array();
$rq = mysql_query( $sql );
if( mysql_num_rows( $rq ) )
{
 while( $rs = mysql_fetch_array( $rq ) )
 {
  
  //$sql ="update v_xyp set b_body= "".str_replace(""","",strip_tags(stripslashes($rs["U_love"])))."" where id=".$rs["id"];
  //mysql_query( $sql ) ;//or die(mysql_error());
  //echo $rs["id"]."
";
  $sqlb ="select * from v_xyp where systype=5 and  b_body="".str_replace(""","",strip_tags(stripslashes($rs["U_love"])))."" and id<>".$rs["id"];
  $query = mysql_query( $sqlb ) ;//or die(mysql_error());
  $num = mysql_num_rows( $query );
  if( $num )
  {
   echo "{".$rs["title"]."}重复内容有{".$num."}条
";
   while( $rs1 = mysql_fetch_array( $query ) )
   {
    echo  $rs1["title"]."
";
   }
   echo "


";
  }/**/
 }
 //echo "标题:".$title."己处理过,自动跳过!";
}

解决办法。

想来想去都没想到,后来在服务中看mysql状态结果自动挂了,mysql自动停了哦,这个可能与我数据处理量或算法有问题了,重启mysql就解决了。

本文来源:http://www.bbyears.com/shujuku/48645.html

猜你感兴趣

热门标签

更多>>

本类排行