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,
Ryan Fox


----- Original Message -----
From: "Wee Chua" <[EMAIL PROTECTED]>

> I have a question regarding the client IP address between PHP and MySql.
The
> 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,
> Calvin


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to