introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.

Go to Topic: PreviousNext
Go to: Message ListNew TopicSearchLog InPrint View

Database connection not working



Posted by: Justin
April 29, 2010 12:21AM
A bit of an odd problem here. MySQL is definitely working since I can create and view databases within phpmyadmin. However, when I go to do anything requiring a connection to the database from a php script...I get an error.

This is an error from a phpbb install as soon as it tries to connect to the database to populate 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 G:\EasyPHP-5.3.2i\www\forum\db\mysql4.php on line 48

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 G:\EasyPHP-5.3.2i\www\forum\db\mysql4.php on line 48

Fatal error: Maximum execution time of 30 seconds exceeded in G:\EasyPHP-5.3.2i\www\forum\db\mysql4.php on line
--------------

Everything is default except the database names, obviously.

For example, in the phpbb install it calls for db host, db user, db pass, db port, etc etc.
I've created the db "new" and the user root is assigned to it, like usual.

This is what I'm giving it:
[tinypic.com] <--click for screenshot


What am I doing wrong?
Options: ReplyQuote
Posted by: Thierry
April 29, 2010 02:56PM
use 127.0.0.1 as hostname
Options: ReplyQuote
Posted by: Matth
May 07, 2010 08:39PM
Same problem here, and it was resolved by setting 127.0.0.1 as server for the connection.
Options: ReplyQuote
Posted by: nisi
May 02, 2010 11:04AM
Report error 2002 for EasyPHP 5.3.2i in Windows 7 Home Premium, but I kan manage MySQL (maybe 127.0.0.1 IP connection, maybe local host).

5.2.10 work fine in Windows 7.
5.3.2i work fine in Windows XP Proffesional 2002 Service Pack 3.

Please correct
Options: ReplyQuote
Posted by: sanjay
April 26, 2011 01:14PM
Database connection failed!
i see this error from 2 days and i reviewed all user fprofiles connection path user privileges and password and hostname but this problem is not resolved

driver = mysql
host =127.0.0.1:3306
username = root
password = root
name = jms
; Enable persistent connections
persistent = Off

; Enable database debug output (very verbose!)
debug = Off

wt can i do even i installed fresh copy of mysql and easyphp..
Options: ReplyQuote
Posted by: Carlos Alonso
April 26, 2011 11:59PM
can I change mySQL password form null to "xxx" ?
Installing a program doesn't run without a pass for mysql.
Thanks
Options: ReplyQuote
Posted by: Thierry
April 27, 2011 10:05AM
password is empty by default
Options: ReplyQuote


Go to: Message ListSearchLog In
Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.