Galedajs Posted July 22, 2011 Report Share Posted July 22, 2011 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! Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 22, 2011 Report Share Posted July 22, 2011 Nepareizs MySQL serveris norādīts. Quote Link to comment Share on other sites More sharing options...
Galedajs Posted July 22, 2011 Author Report Share Posted July 22, 2011 Es domaju, ka serveris ir noradits pareizi, jo to es ari vairakas reizes parbaudiju. Kads cits variants? Quote Link to comment Share on other sites More sharing options...
marcis Posted July 22, 2011 Report Share Posted July 22, 2011 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. Quote Link to comment Share on other sites More sharing options...
Galedajs Posted July 22, 2011 Author Report Share Posted July 22, 2011 (edited) Tatad, cik es no ta sapratu, ar datubazi viss kartiba, bet ka saprast otro dalu? Man mainit kadus failus, vai ari kadu papildus skriptu rakstit? Edited July 22, 2011 by Galedajs Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 22, 2011 Report Share Posted July 22, 2011 Ports nepareizs! Kā jau teicu, nav pareizi serveris norādīts... Quote Link to comment Share on other sites More sharing options...
Galedajs Posted July 23, 2011 Author Report Share Posted July 23, 2011 Jee, beidzot iznaca. Serveris laikam nestradaja. Paldies par palidzibu! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.