By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,303 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,303 IT Pros & Developers. It's quick & easy.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user

100+
P: 121
hello

I am getting following error while connecting to mysql through php

Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'pds@localhost' (Using password: YES)

Actually I hosted one website on linux server, there i uploaded php script to the server, in that script i am trying to connect to the mysql, but i am getting above said problem i.e access denied for this user.

I given all privileges to 'pds' user like "SELECT, INSERT everything"

can anybody tell solution for this problem its urgent

Thank you
Sep 26 '08 #1
Share this Question
Share on Google+
2 Replies


hsriat
Expert 100+
P: 1,654
Your id seems to be the one you use on your local machine. So you need to verify your mysql id and password.
Sep 26 '08 #2

Atli
Expert 5K+
P: 5,058
Are you using this user for another website on the same server?
Does it work there?

Make sure your user is allowed to connect from "localhost".
Try doing something like:
Expand|Select|Wrap|Line Numbers
  1. SELECT host FROM mysql.user WHERE user = 'pds'
  2.  
See if the returning list includes "localhost" or "%".
Sep 26 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.