Solved

URGENT: PHP and mysql 5.0 connection error

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Query return divisible by 3 3 27
hbo knew my windows software 4 62
Checking https returns 301 21 29
Php logic to add to date card 9 23
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

830 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