1 Replies - 335 Views - Last Post: 15 September 2012 - 01:11 PM Rate Topic: -----

#1 nemo php  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-September 12

the code is warning whay?can help me.

Posted 15 September 2012 - 12:35 PM

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in c:\Inetpub\wwwroot\ch10\ch10-1.php on line 14
Access denied for user 'root'@'localhost' (using password: NO)
Is This A Good Question/Topic? 0
  • +

Replies To: the code is warning whay?can help me.

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,991
  • Joined: 08-June 10

Re: the code is warning whay?can help me.

Posted 15 September 2012 - 01:11 PM

Hi.

Like the warning says, MySQL is denying access to the root user with whatever password you used. You need to correct the user information you are using when connecting to MySQL.

By the way, using the root user when connecting to MySQL is a bad idea. You should always use users who's privileges are as limited as possible, for security.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1