Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


URGENT: PHP and mysql 5.0 connection error

Posted on 2006-11-28
Medium Priority
Last Modified: 2008-07-03
ive just installed mysql 5 and my client software is connecting to my DB perfectly (SQLyog)

in my php page i have the following code

$host = "localhost";
$db_user = "root";
$db_Pass = "KhPass360";
$link = mysql_connect ( $host, $db_user, $db_pass ) or die ( 'Connection Error: ' . mysql_error () );

when i run the page i get

Connection Error: Access denied for user 'root'@'localhost' (using password: NO)

do i have to set up a user or something before i try connecting with php
Question by:Robinsonx6
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 11

Expert Comment

ID: 18034762
$db_Pass = "KhPass360";
$db_pass = "KhPass360";
LVL 11

Accepted Solution

ch2 earned 2000 total points
ID: 18034770
PHP is case sensitive.

As you see the server didn't get any pass.

Connection Error: Access denied for user 'root'@'localhost' (using password: NO)

Author Comment

ID: 18034784
ha i think im having a ' Dumb Day'


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question