I have mySql, PHP and the Apache server installed on my computer. The database mySql works OK, the PHP as well but when I want to connect to the database on my local computer it seems not to work. In my php I have the following code: <body> <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'cze00345'; echo 'check 1'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'test'; echo 'check 2'; mysql_select_db($dbname); echo 'check 3'; mysql_close($conn); ?> </body> The browser displays only "check 1", nothing more, so I suspect that there is something wrong with the "$conn=mysql_connect(..." instruction - it may not connect to the database. "root" and "cze00345" are the user and password I am using in the "mysql -h localhost -u root -p" instruction while reaching the database from the DOS window. I am wondering whether there is something more I should do in order to connect to the database via PHP.