I know this seems to be an issue but I can not seem to figure it out, I've spent hours looking at the same line of code and getting nothing, please help.
and this is the codeCode:Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\db_ch03-1.php on line 3 Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\db_ch03-1.php on line 3 Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\db_ch03-1.php on line 3
Code:<?php //connect to MySQL $db = mysql_connect( 'localhost', 'bp6am', 'bp6ampass') or die ('Unable to connect. Check your connection parameters.'); //create the main database if it doesn't already exist $query = 'CREATE DATABASE IF NOT EXISTS moviesite'; mysql_query($query, $db) or die(mysql_error($db)); //make sure our recently created database is the active one mysql_select_db('moviesite', $db) or die(mysql_error($db));

Register
Events
Popular
More
Post #1










Agree x 2
Dumb x 1

