Domanda

I am trying to connect to a MySQL database using the mysql_connect() command however I keep getting the error message:

Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://ravenwolftest.db.4292619.hostedresource.com:3306) in C:\Data\GITA\Web Design\Projects\Ravenwolf\LoginTest.php on line 12

Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Data\GITA\Web Design\Projects\Ravenwolf\LoginTest.php on line 12

I searched around in the phpBB folder and found in the config.php folder there was listed a host name, username, and password. I put those into the mysql_connect() line but get the same error. I am also using godaddy.com for web hosting in case that means anything. As for the code itself all I have is:

mysql_connect('ravenwolftest.db.4292619.hostedresource.com','ravenwolftest','password');

Thanks in advance for any help.

È stato utile?

Soluzione

it seems that either the other server is down or does not allow external connections to the database. i would suggest that you enable external access in your godaddy control panel

Altri suggerimenti

Do you control the machine ravenwolftest.db.4292619.hostedresource.com? Is MySQL running on it? If it's not your local machine, have you verified that MySQL is permitting connections from your machine?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top