Jump to content


Photo

Unable to connect to my database


  • Please log in to reply
6 replies to this topic

#1 SteveJ

SteveJ

    Newbie

  • Member
  • Pip
  • 9 posts
  • Gender:Male
  • Main OS: Windows 7

Posted 14 September 2010 - 05:52 PM

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

#2 Shyokou Ouyou

Shyokou Ouyou

    Member

  • Member
  • PipPip
  • 72 posts
  • Main OS: Windows XP

Posted 14 September 2010 - 10:03 PM


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



#3 SteveJ

SteveJ

    Newbie

  • Member
  • Pip
  • 9 posts
  • Gender:Male
  • Main OS: Windows 7

Posted 15 September 2010 - 12:00 AM


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

#4 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 15 September 2010 - 06:30 AM

“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 :)

#5 SteveJ

SteveJ

    Newbie

  • Member
  • Pip
  • 9 posts
  • Gender:Male
  • Main OS: Windows 7

Posted 15 September 2010 - 09:52 AM

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 :)



#6 wesley1987

wesley1987

    Newbie

  • Member
  • Pip
  • 1 posts
  • Main OS: Windows Vista

Posted 23 September 2010 - 12:14 PM

hmm... how about DREAMWEAVER CS5 portable which access on window 7 ultimate version

#7 Groktar

Groktar

    Newbie

  • Member
  • Pip
  • 1 posts
  • IRC Nickname: Groktar
  • Main OS: Windows Vista

Posted 21 November 2010 - 02:51 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users