MySQL, query history

B@|-|@N Posted messages 386 Status Membre -  
[Dal] Posted messages 6205 Registration date   Status Contributeur Last intervention   -
Hello.

I would like to know if there is a file that stores all the queries executed by users for a database using MySQL as the DBMS.

I am running on RedHat 9 and I also use phpMyAdmin as the graphical interface.

Thank you in advance.

BAHAN

Close the world.||.open the next

1 réponse

[Dal] Posted messages 6205 Registration date   Status Contributeur Last intervention   1 108
 
Hi Bahan,

Look in /var/db/mysql (or your root mysql directory from which the structure of your different databases is located).

There, you should find files like "xxx-bin.001, xxx-bin.002,...". These are the binary logs of your server, which are recorded if you start mysql with the "--log-bin" option (or if the log-bin option is listed in my.cnf; in recent versions of mysql, it's default).

To view them, use the command "mysqlbinlog xxx-bin.002 | less"

More info here: http://dev.mysql.com/doc/mysql/en/mysqlbinlog.html

Dal
P.S.: is your problem with ' resolved?
4