0

Hello.

I am using Easy php

i am trying to connect with the following code

<?php
$con = mysql_connect("localhost","admin","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// some code
?>

getting error as follows

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: NO) in C:\Program Files\EasyPHP 2.0b1\www\test1.php on line 2
Could not connect: Access denied for user 'admin'@'localhost' (using password: NO)

5
Contributors
9
Replies
10
Views
7 Years
Discussion Span
Last Post by akulkarni
0

yes i got it through the admin page ..i used "root" instead of "admin"

Edited by akulkarni: n/a

0

you can update the password also...

run this query in database 'mysql'->table 'user'

update user set Password = md5('12345') where user = "root";

above query update the user 'root' with password '12345'

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.