mysql_connect(): Can't connect to MySQL server on 'www.myweb.com (10061) in d:\accounts\myweb\db_connect.php
i am getting this error while trying to connect to my sql server host from the php form please help
thanks
Jamal
mysql_connect(): Can't connect to MySQL server on 'www.myweb.com (10061) in d:\accounts\myweb\db_connect.php
i am getting this error while trying to connect to my sql server host from the php form please help
thanks
Jamal
Your php code is wrong. Post it. Remove passwords/usernames first, though.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
<?php
define('DB_USER','xyz');
define('DB_PASS','xyz');
define('DB_HOST','www.my.com');
define('DB_NAME','xyz');
$dbc = mysql_connect(DB_HOST,DB_USER,DB_PASS);
mysql_select_db(DB_NAME);
?>
now tel me wats wrong wid it ?
try this:
PHP Code:
define('DB_HOST','localhost');
yes dude i tried it first, and i think the same: there is a problem with either the url i am typing or with my hosting service, because this code is working fine wen i tried it on my local machine.
need help guys
if you are trying to access the mysql from outside of the server hosting it, make sure that they/you have it set up to recieve connections from outside sources (non-localhost).
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Is the above one correct? or its just a spelling mistakeOriginally Posted by Jamal
thetestingsite : im trying to access my web host's local server.
i figured that, and from the title I figured that you were attempting to connect from an outside source (i.e.: trying to access the hosted mysql server from your home server/computer) As I siad in my previous post, make sure that you/your provider has it set up to accept connections from outside sources. I have had that problem with my linux server, and the solution was to allow connections from all.Originally Posted by Jamal
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
NEVER accept from everyone unless you got a Username/password system.
Mine is Boxxertrumps & the password is alkatraz.
too bad i wont tell you my domain.... Bwhahahaahaa! i just figured out how to use it too...
Bookmarks