MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 17th, 2006, 01:28 AM
srock srock is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 2 srock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 23 sec
Reputation Power: 0
10061 Error

Am baffled, have page that calls one of 2 databases depending on the link clicked. One works, the other doesn't - error log states:
Can't connect to MySQL server on 'localhost' (10061)

System: XP SP2
MySql server 4.1.12a-nt (as service)
Apache 2
Php 5.0.4

All is done on localhost,
dbdetail is an expanded version with lots of extra data
dbshort is a bare bones list of information

Using http://localhost/dbindex.htm with links to detail.php/short.php to display data from MySql.

working code:
$mod = $_SERVER['QUERY_STRING'];
$user = "xxx";
$password = "xxx";
$database = "dbdetail";
mysql_connect("localhost",$user,$password);
@mysql_select_db($database) or die("Unable to select database");
$query="SELECT * FROM dwgs WHERE model='$mod'";
$result = mysql_query($query);

non-working code: (causes service crash)
$hstname = "localhost"; #added after having problems
$user="xxx";
$password="xxx";
$database="dbshort";
mysql_connect($hstname,$user,$password);
@mysql_select_db($database) or die("Unable to select database");

Why will the same code work in one php file and not the other,
I can query the tables with MySql browser and Access,
run MySql Admin maintenance to be sure tables are intact -
have gone bald pulling my hair out over this

Suggestions PLEASE

Reply With Quote
  #2  
Old August 17th, 2006, 09:13 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
Can you clarify "causes service crash"?

Is there an error message? Does MySQL itself crash?
Or just your PHP script...
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #3  
Old August 17th, 2006, 09:25 AM
srock srock is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 2 srock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 23 sec
Reputation Power: 0
Quote:
Originally Posted by MadCowDzz
Can you clarify "causes service crash"?

Is there an error message? Does MySQL itself crash?
Or just your PHP script...


MySql server crashes with the dialog box asking to send data to MicroS.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > 10061 Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway