Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging Access 1

Status
Not open for further replies.

shoreman

Programmer
Feb 20, 2003
2
GB
I run a MySQL database that is remotly accessed by a number of different people.

Each person connects to the server using a terminal emulation package, logins in to the unix server using their own login, and then access MySQL via the MySQL prompt.

Is there anyway I can log what each user is doing. i.e. I want to know what SQL statements they have written?
 
Sorry, I dont have an answer to you question.

But why not try to use the client application MySQL-Front, what will be a better interface for the users.
 
Peter, thanks for your suggestion. I will look in to it.
But I know lots of the guys like to use the command prompt!

So if anyone can help with the original question, much appreciated.
 
well this is just easy ;-)

a) edit your /etc/my.cnf
in the [mysqld] section add
log = /path/to/mysql/log
the path could be anything you want

b) start mysqld with the --log[=/path/to/mysql/log] option

for more read
be warned this grows really fast into a huge file
 
And most of the time, the history is stored in [tt]~/.mysql_history[/tt] since MySQL uses the gettext library by default. This is just the most recent queries though. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top