Welcome! Log In Create A New Profile

Advanced

confused smiley connect to database

Posted by BALOYITISETSO 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
confused smiley connect to database
April 19, 2012 03:21PM
hi,i tried to connect to my database and i got the following error message:


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:\Program Files (x86)\EasyPHP-5.3.3\www\connect.php on line 4

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:\Program Files (x86)\EasyPHP-5.3.3\www\connect.php on line 4

Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files (x86)\EasyPHP-5.3.3\www\connect.php on line 4


can anyone help me.
avatar
Mac
confused smiley Re: connect to database
April 19, 2012 05:56PM
I fear there is no readily-available answer sad smiley remember if this was easy everybody would be experts and your qualification would mean ziltch.

Google for a solution. Here is a suggestion:

All you need to do is edit the following file if you have an admin rights

c:\windows\system32\drivers\etc\hosts // search for hosts - it may depend on your OS
Uncomment the line that says

127.0.0.1 localhost // i.e. remove the #

............................

I had this problem.

This is what it should look like if you're having problems:

$connect = mysql_connect('127.0.0.1','root',''winking smiley; // as against using "localhost"
Sorry, you do not have permission to post/reply in this forum.