<?php
$db_name="global_db";// Database name
$conn=mysql_connect("localhost","root","phazorRise") or die("I Couldn't connect");
$db=mysql_select_db($db_name,$conn) or die("I Couldn't select your database");
?>
Error message I'm getting:
Warning: Access denied for user 'root@localhost'(Using password YES) in c:\apache\htdocs\db.php on line 3
Warning:MySQL Connection Failes:Access ddenied for user: 'root@localhost'(Using password YES) in c:\apache\htdocs\db.php on line 3
Couldn't make connection
It was working well. I did some modifications in my form and submitted, and I get surprised by this ERROR.
Please Help !
Warning: Access denied for user 'root@localhost'(Using password YES) in c:\apache\htdocs\db.php on line 3
Warning:MySQL Connection Failes:Access ddenied for user: 'root@localhost'(Using password YES) in c:\apache\htdocs\db.php on line 3
Couldn't make connection
Well, it's pretty obvious. Either user is gone or password is incorrect.
Warning: Access denied for user 'root@localhost'(Using password YES) in c:\apache\htdocs\db.php on line 3
Warning:MySQL Connection Failes:Access ddenied for user: 'root@localhost'(Using password YES) in c:\apache\htdocs\db.php on line 3
Couldn't make connection
Well, it's pretty obvious. Either user is gone or password is incorrect.
I'm aware of this but I know my both user and passwords. I tried it from command prompt and it's accepting it. But through code, it's showing that error.
Technical wrote:Try to create another user and check then.
I fixed the problem. I just restarted both Apache and MySQL.
Then dropped old DB and again created new DB with desired table.
Now I can connect to MySQL. Thank you for suggestions.