Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 22nd, 2005, 05:06 AM
Authorized User
 
Join Date: Aug 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Calverstine Send a message via MSN to Calverstine
Default PHP5 connection problem with MYSQL

(':)') know php 5 has seperated from mysql 4.1 version database server, javascript:insertsmilie
Smile :)anyone know how to configure the PHP 5 to "call" mysql 4.1 to execute the database query?

1.)i've uncomment the php_mysql.dll on php.ini inside apache.
2.) copy "some" dll into the system 32 in the windows installation folder
3.)set the path to reach php c:\php; inside PATH environment.

what else have i miss out?

i've got this error when running the code!
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in G:\Program Files\Apache Group\Apache2\htdocs\a\conn.php on line 4
Could not connect: Can't connect to MySQL server on 'localhost' (10061)

and my coding source is:


<?php

$link = mysql_connect('localhost', 'root@localhost', '@@@')
   or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
?>

 
Old August 26th, 2005, 07:05 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

I think, in $link = mysql_connect('localhost', 'root@localhost', '@@@')

username could not be 'root@localhost'

Still, from the error, it appears, PHP is not understanding the function mysql_connect()



 
Old August 26th, 2005, 07:06 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

I think, in $link = mysql_connect('localhost', 'root@localhost', '@@@')

username could not be 'root@localhost'

Still, from the error, it appears, PHP is not understanding the function mysql_connect()

http://www.mediasworks.com/tutorials...de_windows.htm
 
Old August 31st, 2005, 01:27 AM
Registered User
 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to fromheavenz Send a message via Yahoo to fromheavenz
Default

the same problem i got with php 5 and mysql 4. something
ihave tried ma every posible solution but the same
mysql_connect() error that it couldnt found
so i left php 5 :( :) now ma using php 4.3.something

i think if any one wana use php 5 he/she should use sqlite :)
what else u think
post here:)

ask:)





Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Connection Problem! Doug86 Dreamweaver (all versions) 3 March 30th, 2008 11:15 AM
mysql & php connection problem. Manu Sharma PHP Databases 2 March 2nd, 2007 07:03 AM
PHP5 connection problem with MYSQL Calverstine PHP How-To 0 August 22nd, 2005 05:09 AM
problem with JSP-MySQL connection pandjie Java Databases 2 November 18th, 2004 04:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.