List:Internals« Previous MessageNext Message »
From:Sonam Chauhan Date:November 14 2000 3:44am
Subject:Re: Question on detailed logging
View as plain text  
sasha@stripped wrote:
> 
> Sonam Chauhan wrote:
> >
> > Hi Sasha:
> >
> > I was looking for passing some additional information from the client
> > to mySQL and this information making it's way to the logs.
> >
> > Specifically, I would like to pass a *website* username from Apache/mod_perl
> DBI,
> > (as opposed to passing a *mysql* username) and this information being added to
> a
> > log file.
> > Thanks for your information on the binary log.
> 
> It seems to me like you are trying to knock on the wrong door here. MySQL has no
> way of knowing the website user name in the general case. The kind of logging
> you need should happen in your application.

Yes, this is generally done at the application level. However, MySQL 
has excellent logging and is a definitive source of truth for database changes.

I was hoping I could leverage the logs by extending the Database Driver <--> MySQL 
'conversation' to pass an additional 'comment' parameter on every database query
executed. This does mean additional coding for the DB API and the MySQL server.
but it give admins the capability for fine-grained audits.


Regards,
Sonam

-- 
Sonam Chauhan
Electronic Commerce
Corporate Express Australia Ltd.
Phone: +61-2-9335-0725 Fax: +61-2-9335-0753
Thread