Jump to content
The Uniform Server Community
SteveJ

Unable to connect to my database

Recommended Posts

Hello,

 

I used an older version of Uniform Server before. It created a "W" drive when it was started. I used the "W" drive as my web server, the "C" drive (through the udrive folder) as my testing server, and my desktop as my local computer. I am now using UniServer5_6_13 on Windows 7. It does not create a "W" drive (at least for me). I tried using the C:\UniServer\www folder as both my remote and testing servers, but Dreamweaver can't find my database. I also tried using my desktop folder for both local and testing, but it didn't work either. I can work locally and upload to the web server no problem. I can't connect to dynamic content. I've tried by the wizard and the advanced systems to connect my .php page to a database. The database was created using phpMyAdmin in Uniform Server and appears to run fine. I have created a username and password, but Dreamweaver MX 2004 is not complaining about those - it says that my connection cannot find the database. I am using mySQL and PHP.

 

"2002 A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host as failed to respond."

 

Thanks!!

 

-Steve

Share this post


Link to post
Share on other sites

Obviously, the Nano (aka UniServer 5) series changed a couple of strategies from those "older version"s (Mona and before), e.g., the '"W" drive' and "the udrive folder" no longer a part of ... If you did NOT re-config your Dreamweaver for those changed drive/folder, and possible SQL ... For connection diag, I recommend 'netstat -abn -p tcp' to see if MySQL is running ...

 

Hello,

 

I used an older version of Uniform Server before. It created a "W" drive when it was started. I used the "W" drive as my web server, the "C" drive (through the udrive folder) as my testing server, and my desktop as my local computer. I am now using UniServer5_6_13 on Windows 7. It does not create a "W" drive (at least for me). I tried using the C:\UniServer\www folder as both my remote and testing servers, but Dreamweaver can't find my database. I also tried using my desktop folder for both local and testing, but it didn't work either. I can work locally and upload to the web server no problem. I can't connect to dynamic content. I've tried by the wizard and the advanced systems to connect my .php page to a database. The database was created using phpMyAdmin in Uniform Server and appears to run fine. I have created a username and password, but Dreamweaver MX 2004 is not complaining about those - it says that my connection cannot find the database. I am using mySQL and PHP.

 

"2002 A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host as failed to respond."

 

Thanks!!

 

-Steve

Share this post


Link to post
Share on other sites

Obviously, the Nano (aka UniServer 5) series changed a couple of strategies from those "older version"s (Mona and before), e.g., the '"W" drive' and "the udrive folder" no longer a part of ... If you did NOT re-config your Dreamweaver for those changed drive/folder, and possible SQL ... For connection diag, I recommend 'netstat -abn -p tcp' to see if MySQL is running ...

 

Hello Shyokou,

 

Thanks for the speedy reply. they have changed a lot. I did not change my configuration of Dreamweaver. I have allowed a hole in my Windows firewall for MySQL. MySQL is listening (port 3306, mysql-opt.exe) according to netstat -abn -p tcp.

 

-Steve

Share this post


Link to post
Share on other sites

“I am now using UniServer5_6_13 on Windows 7”

“The database was created using phpMyAdmin in Uniform Server and appears to run fine.”

 

From the above your servers are working correctly. :)

Since you are using Windows 7 do not use localhost in any database configurations

 

MySQL does not recognise IPV6 addresses (Windows 7 default) it uses IPV4

Hence replace “localhost” with 127.0.0.1 this forces an IPV4 connection

 

I am not sure what configuration parameter is referred to in Dreamweaver MX 2004

It may be something like db_host = localhost

Change it to db_host = 127.0.0.1

 

There are alternatives to the above an excellent article by bobs can be found here.

 

All the best

Ric :)

Share this post


Link to post
Share on other sites

Ric,

 

All's I can say is "pure genius". Using 127.0.0.1 instead of 'localhost' as my MySQL server address fixed the problem pronto!

 

Thanks!!

 

-Steve

 

“I am now using UniServer5_6_13 on Windows 7”

“The database was created using phpMyAdmin in Uniform Server and appears to run fine.”

 

From the above your servers are working correctly. :)

Since you are using Windows 7 do not use localhost in any database configurations

 

MySQL does not recognise IPV6 addresses (Windows 7 default) it uses IPV4

Hence replace “localhost” with 127.0.0.1 this forces an IPV4 connection

 

I am not sure what configuration parameter is referred to in Dreamweaver MX 2004

It may be something like db_host = localhost

Change it to db_host = 127.0.0.1

 

There are alternatives to the above an excellent article by bobs can be found here.

 

All the best

Ric :)

Share this post


Link to post
Share on other sites

I'm getting the exact same error message, but changing the host to 127.0.0.1 didn't fix it. I can see mysqld-opt in my processes, as well as connect to mysql through sqlyog using both 127.0.0.1 and localhost. Any ideas where to investigate further?

 

edit: I'm setting up a local environment for easier editing of my live website. The page I'm having trouble with is the phpbb3 script. I changed the connection details in the config.php file for it. The version of phpmyadmin included with uniserver also works for me.

 

Exact error message:

 

SQL ERROR [ mysql4 ]

 

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. [2002]

 

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...