I understand what you are saying. Let's go further for the different tables
privilege, if I have Select privilege on table A, and Delete privilege on
table B of Database mydatabase, how can the built-in privilege tables to
check on this problem since the mysql_connect doesn't include the client
From: Ryan Fox [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 4:44 PM
To: Wee Chua; MySQL (E-mail)
Subject: Re: Php connection with mysql?
In your situation, MySQL sees the client to be the web server, as it is the
box that connects to the database and executes queries. If you need finer
granualarity on the access controls at the MySQL level, you can pass
different usernames/passwords to MySQL through the php mysql_connect()
function dependant on what user is authenticated in to your web server. If
you need to restrict clients on a per-IP basis, you can do this at the php
level by checking the $REMOTE_ADDR variable and acting accordingly.
Hope this helps,
----- Original Message -----
From: "Wee Chua" <[EMAIL PROTECTED]>
> I have a question regarding the client IP address between PHP and MySql.
> built-in mysql database have different privilege tables. When I log on to
> mysql through the internet browser, does mysql know where I am connecting
> from if I use mysq_connect(.....) function? From what I see, this function
> doesn't tell where I am connecting from, if this is true, those privilege
> tables are not helping to check on the privileges if the client is from
> browser. Does it have any other ways to tell mysql server where the client
> is connection from besides default localhost?
> Thank you,
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]