Page 1 of 1

very important request please

Posted: Sun Dec 20, 2009 5:31 pm
by mohamed essam
hello every body iam new member in this very good forum .


i want to ask question please when i made connection to the database i found error that i cannot find a soultion for it

my code for my database connection is(

Code: Select all

<?php
$con = mysql_connect("localhost","medo_elgen6681@yahoo.com ","xxxxxxx");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
 
?>
 
and this is the error that i cannot pass it
(
Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\AppServ\www\conn.php on line 2

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:\AppServ\www\conn.php on line 2

Fatal error: Maximum execution time of 60 seconds exceeded in C:\AppServ\www\conn.php on line 2
)




please i want to know the reasons for this error and how can i solve it ?

thank you .

Re: very important request please

Posted: Sun Dec 20, 2009 6:04 pm
by mohamed essam
any one can reply my qeustion please?

Re: very important request please

Posted: Sun Dec 20, 2009 7:52 pm
by Christopher
From the error message, it sounds like the server is not available or responding.

Re: very important request please

Posted: Sun Dec 20, 2009 9:48 pm
by nimeshrmr
looks like your server hasnet been started.check services in control panel

Re: very important request please

Posted: Mon Dec 21, 2009 9:46 am
by mohamed essam
ok i tried to uninstall this version of app server and setup new version but when i made connection to the database there was this error.


Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mohamed'@'localhost' (using password: YES) in D:\AppServ\www\conn.php on line 2
no connection: Access denied for user 'mohamed'@'localhost' (using password: YES)

although the server admin name is (mohamed)


please reply me ?
thank you in advanced.

Re: very important request please

Posted: Wed Dec 23, 2009 4:43 pm
by manohoo
Review privileges and make sure that user "mohamed" has proper access.

Since you have reinstall mysql I would create a new user from scratch, configure privileges and give it a try.