I downloaded the server from [http://www.denwer.ru/]. It is impossible to get access to the database. 1 file 1.php

<pre> <?php $db_host='test1.ru'; $db_database='test'; $db_username='root'; $db_password='YES'; ?> </pre> 

Page itself

 <pre> <?php include('1.php'); // Подключиться к базе данных $connection = mysql_connect($db_host, $db_username, $db_password); if (!$connection) { die("Невозможно подключиться к базе данных: <br />". mysql_error()); } ?> </pre> 

Help a newbie. Chose the error Warning: mysql_connect () [function.mysql-connect]: Access denied for the user 'root' @ 'localhost' (using password: YES) in J: hometest1.ruwwwwindex.php on line 12 Unable to connect to database Data: Access denied for user 'root' @ 'localhost' (using password: YES)

    2 answers 2


     Access denied for user 'root'@'localhost' (using password: YES) 

    means that you are using the wrong password to connect to the database

       define('BD_NAME','your_db'); ............................. mysql_select_db(BD_NAME,$connection) or die(mysql_error());