Warning:mysql_connect () [Function.mysql-connect]: [2002] Unable to connect because the target machine is actively rejecting

Source: Internet
Author: User
Tags error code


The error code is as follows

Aabb
Warning:mysql_connect () [Function.mysql-connect]: [2002] Unable to connect because the target machine is actively rejecting. (Trying to connect via tcp://localhost:3306) in x:test7.php on line 6

Warning:mysql_connect () [Function.mysql-connect]: Unable to connect because the target machine is actively rejecting. In x:test7.php on line 6

warning:mysql_select_db () [Function.mysql-select-db]: [2002] Unable to connect because the target machine is actively rejecting. (Trying to connect via tcp://localhost:3306) in x:test7.php on line 7

warning:mysql_select_db () [function.mysql-select-db]: Unable to connect because the target machine is actively rejecting. In x:test7.php on line 7

warning:mysql_select_db () [function.mysql-select-db]: A link to the server could is established in x:test7.php on Lin E 7

Warning:mysql_query () [Function.mysql-query]: [2002] Unable to connect because the target machine is actively rejecting. (Trying to connect via tcp://localhost:3306) in x:test7.php on line 8

Warning:mysql_query () [Function.mysql-query]: Unable to connect because the target machine is actively rejecting. In x:test7.php on line 8

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

Warning:mysql_query () [Function.mysql-query]: [2002] Unable to connect because the target machine is actively rejecting. (Trying to connect via tcp://localhost:3306) in x:test7.php on line 14

Warning:mysql_query () [Function.mysql-query]: Unable to connect because the target machine is actively rejecting. In x:test7.php on line 14

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

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

The program code is simple

The code is as follows Copy Code


$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 ']. <br/> ';
$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 ' <font color= ' #0000FF ' >{'. $rs [' title ']. ' The duplicate content has {'. $num. '} </font><br/> ';
while ($rs 1 = mysql_fetch_array ($query))
{
echo $rs 1[' title ']. ' <br/> ';
}
echo ' }/**/
}
Echo ' title: <font color=red> '. $title. ' </font> has been handled, automatically skipped! ';
}

Solutions.

Want to think about it, later in the service to see the results of MySQL state automatically hung, MySQL automatically stopped oh, this may be with me data processing volume or algorithm problems, restart MySQL to solve.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.