|
|
|
|
|
|
| Author |
Message |
Pankaj *nix forums beginner
Joined: 11 May 2005
Posts: 18
|
Posted: Thu Jul 20, 2006 12:28 pm Post subject:
mysql_connect()
|
|
|
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 ? |
|
| Back to top |
|
 |
Laurent Duretz *nix forums beginner
Joined: 20 Jul 2006
Posts: 2
|
Posted: Thu Jul 20, 2006 12:44 pm Post subject:
Re: mysql_connect()
|
|
|
Pankaj a écrit :
| Quote: | 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 ?
|
If you are using tour ISP IP, it could be wrong.
Try 127.0.0.1 |
|
| Back to top |
|
 |
JDS *nix forums Guru Wannabe
Joined: 01 Mar 2005
Posts: 226
|
Posted: Thu Jul 20, 2006 4:23 pm Post subject:
Re: mysql_connect()
|
|
|
On Thu, 20 Jul 2006 05:28:46 -0700, Pankaj wrote:
| Quote: | am trying to connect to a database. When I use the following syntax,
the connections works
|
Please don't MULTIPOST!
--
JDS |
|
| Back to top |
|
 |
Dima Vidmich *nix forums beginner
Joined: 21 Jul 2006
Posts: 1
|
Posted: Fri Jul 21, 2006 1:54 pm Post subject:
Re: mysql_connect()
|
|
|
Pankaj wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Sat Nov 22, 2008 9:22 pm | All times are GMT
|
|
ADHD Coach | Internet Advertising | Mobile Phone | Loans | Property Search
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|