Re: PHP with MySQL
| From: | Miguel Cruz | Date: | Fri, 03 May 2002 03:06:59 +0000 |
| Subject: | Re: PHP with MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95816@lists.php.net to get a copy of this message | ||
On Thu, 2 May 2002, Paras Mukadam wrote:
> one MySQL - PHP query : while granting permissions to particular user in
> MySQL, the administrator has to give username@machine_address !! Then how
> can we connect to MySQL through PHP only by passing "username" as one of the
> arguments to mysql_connect() ?
If the MySQL database is on the same machine as PHP, then grant access to
'username@localhost'. If you want to allow PHP (and other mysql client
library programs) on all hosts to be able to connect, then grant access to
'username@"%"' (the % works as a wildcard).
miguel