RE: [PHP-DB] Cant connect to a remote mySQL database
| From: | Matt Williams | Date: | Tue, 23 Oct 2001 18:23:33 +0000 |
| Subject: | RE: [PHP-DB] Cant connect to a remote mySQL database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13638@lists.php.net to get a copy of this message | ||
> Warning: Access denied for user: 'root@libra.mty.itesm.mx' (Using
> password:
> NO) in /usr/local/apache/htdocs/pruebamysql.php on line 5
>
> Warning: MySQL Connection Failed: Access denied for user:
> 'root@libra.mty.itesm.mx' (Using password: NO) in
> /usr/local/apache/htdocs/pruebamysql.php on line 5
> 1045: Access denied for user: 'root@libra.mty.itesm.mx' (Using
> password: NO)
>
>
> And here it is the php.. wher it says localhost, I should only
> type the remote
> IP address?
>
> <HTML><HEAD><TITLE>Form Results </TITLE>
> <BODY>
>
> <?php
> $connection = mysql_connect('localhost,'root');
> if ($connection == false){
> echo mysql_errno().": ".mysql_error()."<BR>";
> exit;
> }
you need to supply the host address (name or ip), your username and
password.
look here for more
www.php.net/mysql_connect
M: