Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 28th, 2002, 08:45 AM
ruzle ruzle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: uk
Posts: 9 ruzle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ruzle
php & mysql

hi, i am having a bash at learning php and have been trying to connect to mysql.
i have apache 2, mysql 3, and php 4 running on a win2k machine.
i have apache and php playing nicely, but am having trouble getting mysql in on the act.

i have set up a user on mysql with both user and password "apache" and can access the database from a command prompt with this user.

however when i try to connect through the web server with php, using
$connection = mysql_connect("localhost", "apache", "apache");
i get this error on the generated webpage

Warning: Can't connect to MySQL server on 'localhost' (10061) in E:\Program Files\Apache Group\Apache2\htdocs\phpplay\dbConnect1.php on line 13

do i need to install anything else to allow db connections from php or am i just doing something stupid.

any help appreciated
ruzle

Reply With Quote
  #2  
Old July 29th, 2002, 11:29 AM
mantas mantas is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: atlanta,ga
Posts: 255 mantas User rank is Sergeant (500 - 2000 Reputation Level)mantas User rank is Sergeant (500 - 2000 Reputation Level)mantas User rank is Sergeant (500 - 2000 Reputation Level)mantas User rank is Sergeant (500 - 2000 Reputation Level)mantas User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 13 h 17 m 20 sec
Reputation Power: 18
Are Apache and mySql on the same drive? In your case E:

Mantas

Reply With Quote
  #3  
Old July 29th, 2002, 03:34 PM
ruzle ruzle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: uk
Posts: 9 ruzle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ruzle
yep,
they are in E:\mysql3\ and E:\php4\ respectively
apache is on E: too in program files\apache group\

all the install guides i've seen seem to imply if you've installed mysql then they should just work, there doesn't seem to be anyother instructions.

it seems that most people have coped fine, i'm not sure what i've managed to do.

it was quite a whie ago that i did all the installing as i've only just got reound to trying to have a play with the database stuff.
is it possible that if i were to have installed apace and php before mysql, php may not know that its there.
does anyone know for sure before i go for a reinstall of them, as i can't remember what order they went on in.

Reply With Quote
  #4  
Old August 6th, 2002, 08:09 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 9
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
First uninstall php and then after installing mysql ,you may install php.that should work i suppose.check whether database is running properly before you test.
__________________
SR -
webshiju.com
www.lizratechnologies.com

"The fear of the LORD is the beginning of knowledge..."

Reply With Quote
  #5  
Old August 8th, 2002, 04:27 AM
andywhitt's Avatar
andywhitt andywhitt is offline
PHP Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: England
Posts: 163 andywhitt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 25 m 12 sec
Reputation Power: 7
Have you got it working?

Reply With Quote
  #6  
Old August 8th, 2002, 04:09 PM
ruzle ruzle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: uk
Posts: 9 ruzle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ruzle
i have absolutly shafted my windows installation, nothing to do with any of the web stuff so don't worry.

got it all running fine under linux tho, i'll have a go with windows when i get around to re-installing it, but its going to be quite a task, one that i don't feel over keen on, as i have alot of programs to put back on, and find cd's for

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > php & mysql


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 3 hosted by Hostway