Hii Guys Please Help I got following error when i use mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Hi there,
Unfortunately the answer is simpler than it seems: you are either using the incorrect password or username or both.
I think the problem is your password, default for mysql is "" (nothing).

First make sure you have set up a username and password as it is not advisory that you use the root username and password. Then you need to connect to the database like this:

<?php
$con = mysql_connect( "localhost" , "USERNAME" , "PASSWORD" );
mysql_select_db( "DATABASE" , $con );
?>

And you should connect fine. As for the PHPMyAdmin problem, is it warning you of this error or is this just when you are connecting to the MySql server via a PHP document?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.