Wrox Programmer Forums
|
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 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 June 13th, 2009, 03:34 AM
Registered User
 
Join Date: Jun 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default MySQL not working

Can someone please give me some advice on getting MySQL to work? This is all I see when I try to run the program on page 87 inchap. 3. I had no problems in chap. 2.

"Unable to connect. Check your connection parameters."

I copied the code from the website.
 
Old June 13th, 2009, 07:23 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

This is the error message you are telling the page to display if the connection fails, so it's a bit tricky to know what is going wrong. Here's some suggestions:

1. Have you checked that you have changed the username and password etc to your one and aren't using what's in the downloaded code?

2. Make sure MySQL is still running - try your chapter 2 code again.

3. Remove the "or die ..." bit from the code so php outputs the actual error message. Note you may need to set display_errors to on at the top of the page, or you may just get a blank screen (explanation here):
Code:
<?php
ini_set('display_errors', 1);
$db = mysql_connect('localhost', 'bp6am', 'bp6ampass');
// ... rest of code
?>
HTH
Phil
The Following User Says Thank You to philip_cole For This Useful Post:
mrjbblaque (June 13th, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
window.opener working .... not working alyeng2000 Javascript How-To 5 January 5th, 2007 08:05 AM
Web.Config..Working or Not Working peace95 ASP.NET 1.0 and 1.1 Basics 1 September 18th, 2006 06:53 AM
Php code to put&get images from mysql not working! angelbeans PHP Databases 1 September 8th, 2006 12:44 PM
php 5 not working with mysql fromheavenz PHP Databases 0 August 30th, 2005 12:31 PM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM





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