Solved

URGENT: PHP and mysql 5.0 connection error

Posted on 2006-11-28
3
202 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
  • 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 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)
0
 
LVL 2

Author Comment

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

chears
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now