Re: MySQL CONNECTION PROBlem2
| From: | nabil | Date: | Tue, 10 Jun 2003 13:47:09 +0000 |
| Subject: | Re: MySQL CONNECTION PROBlem2 | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28481@lists.php.net to get a copy of this message | ||
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");
?>
and the user table of mysql database :
#
# Dumping data for table
user
#
INSERT INTO user VALUES ('localhost', 'root', '', 'Y',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y');
INSERT INTO user VALUES ('%', 'root', '', 'N',
'N', 'N', 'N', 'N', 'N', 'N',
'N', 'N', 'N', 'Y', 'N', 'N',
'N');
INSERT INTO user VALUES ('localhost', '', '', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y');
INSERT INTO user VALUES ('%', '', '', 'N', 'N',
'N', 'N', 'N', 'N', 'N',
'N', 'N', 'N', 'N', 'N', 'N',
'N');
so it has the '%' value so it can be accessed by any host.!!!1
any comment ???
"Cristian Marin" <cristic@interakt.ro> wrote in message
news:20030609133526.73891.qmail@pb1.pair.com...
You don't have the rights to connect to the MySQL server with
root@127.0.0.1. You have to add this user to the mysql users table and to
allow him to do the needed actions. Also you have to modify the hosts table.
--
-------------------------------------------------
Cristian MARIN
InterAKT Online (www.interakt.ro)
+4021 411 2610
cristic@interakt.ro
"Nabil" <nabil.attar@aws-syria.com> wrote in message
news:20030609090930.69091.qmail@pb1.pair.com...
Sorry , when i put the IP instead of "localhost " i got the error...