URGENT: PHP and mysql 5.0 connection error

Posted on 2006-11-28
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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

734 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