Re: MySQL CONNECTION PROblem
| From: | George Patterson | Date: | Tue, 10 Jun 2003 23:43:57 +0000 |
| Subject: | Re: MySQL CONNECTION PROblem | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28511@lists.php.net to get a copy of this message | ||
On Tue, 10 Jun 2003 16:47:26 +0300
"nabil" <nabil.attar@aws-syria.com> wrote:
> but when i used mysql_error() i got : "sorry database not found"
>
> as my dbconnect.php file includes
>
> <?
> mysql_connect("192.168.0.111" , "root" , "password") or
> die("SORRY
> CANNOT CONNECT") ;
> mysql_select_db("kt") or
> die("sorry database not found");
> ?>
Nabil,
Try changing the last line statement to
mysql_select_db("kt") or die("sorry database not found". mysql_error());
This will show what the error really is.
Example, You have created the database haven't you??
Try using the mysql client to connect from the web server to the mysql
server.
George Patterson