Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 7th, 2005, 2:27 PM   #1
ArchAngel
Programmer
 
ArchAngel's Avatar
 
Join Date: Jan 2005
Location: I could be anywhere, even Indiana
Posts: 34
Rep Power: 0 ArchAngel is on a distinguished road
Send a message via AIM to ArchAngel Send a message via MSN to ArchAngel Send a message via Yahoo to ArchAngel
More MySQL errors

Yes, that's right, I'm having another problem with MySQL,
I'm trying to connect to MySQL with this code:

[PHP]<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?php
$user="usr";
$host="ip";
$password="pwd";
mysql_connect($host,$user,$password);
?>
</body>
</html>[/PHP]

But instead of connecting, I get this little present:

Warning: mysql_connect(): Access denied for user: '****@*******' (Using password:YES)

Anybody know what's wrong?
ArchAngel
__________________
People say I'm crazy, but I have the heart of a little boy. It's in my desk at home.

Last edited by ArchAngel; Mar 7th, 2005 at 2:30 PM.
ArchAngel is offline   Reply With Quote
Old Mar 7th, 2005, 2:52 PM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
your MySQL server isn't letting your user connect because
a) your password is wrong
b) the username doesn't exist
c) that user is not allowed to login from the host name it's logging in from
d) any combination of the above
check your MySQL Server

Dizz
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Mar 7th, 2005, 4:47 PM   #3
ArchAngel
Programmer
 
ArchAngel's Avatar
 
Join Date: Jan 2005
Location: I could be anywhere, even Indiana
Posts: 34
Rep Power: 0 ArchAngel is on a distinguished road
Send a message via AIM to ArchAngel Send a message via MSN to ArchAngel Send a message via Yahoo to ArchAngel
How pray tell does one check this information?
__________________
People say I'm crazy, but I have the heart of a little boy. It's in my desk at home.
ArchAngel is offline   Reply With Quote
Old Mar 7th, 2005, 4:52 PM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
in postgresql, you have to set the permissions of the database to allow outside (as in from the net) connections with a certain user. Not sure if you would have to do something like that for mysql. In postgresql the file is called pg_hba.conf or something like that.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Mar 7th, 2005, 6:56 PM   #5
BlazingWolf
Hobbyist Programmer
 
Join Date: Sep 2004
Posts: 207
Rep Power: 4 BlazingWolf is on a distinguished road
If you never set the Username, or password then it is

User: "root"
Pass: ""

No qoutes of course.

The host I assume is running on the machine you are testing your PHP on so it is "localhost".
__________________
_______________________________
BlazingWolf
BlazingWolf is offline   Reply With Quote
Old Mar 7th, 2005, 8:39 PM   #6
ArchAngel
Programmer
 
ArchAngel's Avatar
 
Join Date: Jan 2005
Location: I could be anywhere, even Indiana
Posts: 34
Rep Power: 0 ArchAngel is on a distinguished road
Send a message via AIM to ArchAngel Send a message via MSN to ArchAngel Send a message via Yahoo to ArchAngel
I have username, and password, in my.ini,
and I'm sure I'm using them, but it still doesn't work.
__________________
People say I'm crazy, but I have the heart of a little boy. It's in my desk at home.
ArchAngel is offline   Reply With Quote
Old Mar 7th, 2005, 8:41 PM   #7
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Weird. The problem is the database isn't allowing those credentials to pass. MySQL doesn't think that's the right information...
__________________

tempest is offline   Reply With Quote
Old Mar 8th, 2005, 7:57 AM   #8
ArchAngel
Programmer
 
ArchAngel's Avatar
 
Join Date: Jan 2005
Location: I could be anywhere, even Indiana
Posts: 34
Rep Power: 0 ArchAngel is on a distinguished road
Send a message via AIM to ArchAngel Send a message via MSN to ArchAngel Send a message via Yahoo to ArchAngel
Is there any other way to check any other accounts I have besides the one I was trying?
__________________
People say I'm crazy, but I have the heart of a little boy. It's in my desk at home.
ArchAngel is offline   Reply With Quote
Old Mar 8th, 2005, 9:11 AM   #9
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,462
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Add a new user to the User table in MySQL ... change the login information in your script to reflect the new user info. Then try it,
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Mar 8th, 2005, 10:06 AM   #10
ArchAngel
Programmer
 
ArchAngel's Avatar
 
Join Date: Jan 2005
Location: I could be anywhere, even Indiana
Posts: 34
Rep Power: 0 ArchAngel is on a distinguished road
Send a message via AIM to ArchAngel Send a message via MSN to ArchAngel Send a message via Yahoo to ArchAngel
'User table'? Sorry but I'm a SQL nub, you mean make a diff account in the ini?
__________________
People say I'm crazy, but I have the heart of a little boy. It's in my desk at home.
ArchAngel is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:33 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC