|
Posted by Dima Vidmich on 12/17/47 11:53
Pankaj wrote:
> am trying to connect to a database. When I use the following syntax,
> the connections works
>
> $server=localhost
> $username=myusername;
> $password=mypassword
>
> mysql_connect($server,$username,$password);
>
> However, if I change the $server="server_ip", I get an error
> "Access Denied for user user_name@" (using password:YES)
>
> What could be wrong ? Is it some permission issue ?
Probably your mysql login was created with restrict on connection
address.
Try grant also username@server_ip as was granted username@localhost
or update your login entry in mysql.user with Host='%' to allow any
connection ip
WBR, Dima Vidmich
Navigation:
[Reply to this message]
|