| Bug #36096 | PHP script cannot connect to mysql db | ||
|---|---|---|---|
| Submitted: | 15 Apr 2008 16:21 | Modified: | 15 Apr 2008 17:49 |
| Reporter: | Paul Gathogo | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | 5.0 | OS: | Windows (Vista- Busines Edition) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | MySQL, php, vista | ||
[15 Apr 2008 17:49]
MySQL Verification Team
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug. Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/ Thank you for your interest in MySQL.

Description: Am trying to do a simple mysql database connection from my php script but the connection fails. Am runnining PHP 5, Mysql 5, Apache 2.2 and MS Windows Vista Business Edition. My code looks like this: <?php $echo " Connecting to database ..."; $conn = mysql_connect("localhost","user","passwd"); if (!$conn) { die('Failed to connect!'.mysql_error()); } if ($conn) { echo "Connected !! "; } ?> The code does not go past the mysql_connect() function. Please help. Paul How to repeat: Run this script on: Windows Vista Business Edition, Php5 mysql5 apache2.2 <?php $echo " Connecting to database ..."; $conn = mysql_connect("localhost","user","passwd"); if (!$conn) { die('Failed to connect!'.mysql_error()); } if ($conn) { echo "Connected !! "; } ?> Suggested fix: