Re: Access to MySQL denied
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Access to MySQL denied | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13742@lists.php.net to get a copy of this message | ||
>Of course, it works perfectly fine on my home computer, so I guess it musthave something to do
>with the configuration of PHP (or, possibly, MySQL?)
How do you connect to MySQl from home?
It sounds as if the user trying to connect to MySQL doesn't have the right privileges to
connect
top the server.
Make sure the 'username' @lsh101.siteprotect.com has been granted all the right privileges
on the
desired database:
GRANT SELECT,INSERT,UPDATE,DELETE
ON mydb.*
TO username@localhost (or username@lsh101.siteprotect.com)
IDENTIFIED BY 'your_password';
FLUSH PRIVILIGES;
HTH.
Russ
On Fri, 26 Oct 2001 04:48:56 -0400 Kirill Safarov <kasafarov@hotmail.com> wrote:
> I cannot connect to MySQL database located at the webhost. The command:
> $link = mysql_connect('hostname:3306','username','password') or
> die ("Could
> not connect");
> (with the proper hostname of course) returns this error message:
> MySQL Connection Failed: Access denied for user:
> 'username@lsh101.siteprotect.com' (Using password: YES)
>
> Of course, it works perfectly fine on my home computer, so I guess it must
> have something to do with the configuration of PHP (or, possibly, MySQL?)
>
> Can anyone tell me what's going on?
>
> Thanks,
> Kirill :)
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#