|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Are Apache and mySql on the same drive? In your case E:
Mantas |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
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..." |
|
#5
|
||||
|
||||
|
Have you got it working?
|
|
#6
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > php & mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|