Jump to content
php.lv forumi

Warning: mysql_connect() [function.mysql-connect]: [2002]


Galedajs

Recommended Posts

Sveiki! Man ieksa php scripta ir sads kods:

 

<?php

$link = mysql_connect(' hosts ', ' useris ', ' parole ') ;

if (!$link)

{

die(mysql_error()) ;

}

echo "savienojas!";

mysql_close($link) ;

?>

 

Tam butu jasavienojas ar serveri (ne - localhost), bet tas aiziet lidz timeout un izmet vairakus error.

 

Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://mysql4.000webhost.com:3306) in C:\wamp\www\test.php on line 2

 

Kas tur varetu but par problemu?

 

Paldes ieprieks par palidzibu!

Link to comment
Share on other sites

http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html

The error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying

to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...