![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
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. |
|
|
|
|
|
#2 |
|
Professional Programmer
|
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 |
|
|
|
|
|
#3 |
|
Programmer
|
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. |
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() |
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! |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Sep 2004
Posts: 207
Rep Power: 4
![]() |
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 |
|
|
|
|
|
#6 |
|
Programmer
|
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. |
|
|
|
|
|
#7 |
|
Programming Guru
![]() |
Weird. The problem is the database isn't allowing those credentials to pass. MySQL doesn't think that's the right information...
__________________
|
|
|
|
|
|
#8 |
|
Programmer
|
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. |
|
|
|
|
|
#9 |
|
Programming Guru
![]() ![]() ![]() |
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." |
|
|
|
|
|
#10 |
|
Programmer
|
'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. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|