Page 1 of 1

Connecting to Mysql from PHP 5.3.3

Posted: Sun Nov 07, 2010 9:58 am
by Lex-Man
I have installed Mysql on my pc and am trying to connect to the database from my PHP enabled webserver.

Using the code:

<?php
ini_set('display_errors', 1);
mysql_connect("localhost", "php", "*****") or die(mysql_error());
echo "Connected to MySQL<br />";
?>

I get the error

Fatal error: Maximum execution time of 30 seconds exceeded in C:\testbed\document.php on line 3

if I use the wrong password I get the error:

Warning: mysql_connect(): Access denied for user 'php'@'localhost' (using password: YES) in C:\testbed\document.php on line 3 Fatal error: Maximum execution time of 30 seconds exceeded in C:\testbed\document.php on line 3

What can I try to solve this problem?

Re: Connecting to Mysql from PHP 5.3.3

Posted: Sun Nov 07, 2010 10:14 am
by Lex-Man
Ok fixed this problem.