How to show the last queries executed on MySQL?

后端 未结 10 933
感情败类
感情败类 2020-11-22 07:03

Is there any query/way to show the last queries executed on ALL servers?

10条回答
  •  一整个雨季
    2020-11-22 07:21

    If mysql binlog is enabled you can check the commands ran by user by executing following command in linux console by browsing to mysql binlog directory

    mysqlbinlog binlog.000001 >  /tmp/statements.sql
    

    enabling

    [mysqld]
    log = /var/log/mysql/mysql.log
    

    or general log will have an effect on performance of mysql

提交回复
热议问题