very important request please

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mohamed essam
Forum Newbie
Posts: 5
Joined: Sun Dec 20, 2009 5:19 pm

very important request please

Post 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 .
mohamed essam
Forum Newbie
Posts: 5
Joined: Sun Dec 20, 2009 5:19 pm

Re: very important request please

Post by mohamed essam »

any one can reply my qeustion please?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: very important request please

Post by Christopher »

From the error message, it sounds like the server is not available or responding.
(#10850)
nimeshrmr
Forum Newbie
Posts: 2
Joined: Sun Dec 20, 2009 9:41 pm

Re: very important request please

Post by nimeshrmr »

looks like your server hasnet been started.check services in control panel
mohamed essam
Forum Newbie
Posts: 5
Joined: Sun Dec 20, 2009 5:19 pm

Re: very important request please

Post 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.
User avatar
manohoo
Forum Contributor
Posts: 201
Joined: Wed Dec 23, 2009 12:28 pm

Re: very important request please

Post 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.
Post Reply