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

x
?
Solved

URGENT: PHP and mysql 5.0 connection error

Posted on 2006-11-28
3
Medium Priority
?
209 Views
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
0
Comment
Question by:Robinsonx6
[X]
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
3 Comments
 
LVL 11

Expert Comment

by:ch2
ID: 18034762
change
$db_Pass = "KhPass360";
to
$db_pass = "KhPass360";
0
 
LVL 11

Accepted Solution

by:
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)
0
 
LVL 2

Author Comment

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

chears
0

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 (http://en.wikipedia.org/wiki/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