BorisZ Posted June 20, 2010 Report Posted June 20, 2010 Hi, Im using Uniformserver for long time and this is the first time Im facing with the problem. Yesterday I downloaded the latest version of Uniformserver and before that I think I was using 4.3 version. As I said before that I didnt had any kind of problems and all worked OK, but after I unpacked this latest version and added my files within "www" folder I started server and when I want to open any .php page which is connecting to database Im getting fallowing error: 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 D:\CouponsDepo.com\www\connections\coupons_database.php on line 9 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 D:\CouponsDepo.com\www\connections\coupons_database.php on line 9 Fatal error: 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 D:\CouponsDepo.com\www\connections\coupons_database.php on line 9 now the file whihc is used to connect to database it as fallows: <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_coupons_database = "localhost"; $database_coupons_database = "rootdatabase"; $username_coupons_database = "root"; $password_coupons_database = "root"; $coupons_database = mysql_connect($hostname_coupons_database, $username_coupons_database, $password_coupons_database) or trigger_error(mysql_error(),E_USER_ERROR); ?> what is the problem, why with previous versions I didnt had any problem and with this new open I cant open any php file whos connecting to database. BTW clean .html pages are ok, and also .php pages which are not connecting to database login file so I guess that something is wrong in there. Thanks for help. Best Regards Quote
Ric Posted June 20, 2010 Report Posted June 20, 2010 Instead of:$hostname_coupons_database = "localhost"Try:$hostname_coupons_database = "127.0.0.1"All the bestRic :angry: Quote
BorisZ Posted June 20, 2010 Author Report Posted June 20, 2010 perfect, its working now :angry: Thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.