Questions tagged [general-log]

The general query log is a general record of what mysqld is doing.

The server writes information to this log when clients connect or disconnect, and it logs each SQL statement received from clients. The general query log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld.

9 questions
4
votes
3 answers

ERROR 1146 (42S02): Table 'mysql.general_log' doesn't exist

After mysql upgrade I'm getting this error on my Centos box when I tried to enable general_log. Any idea? SET GLOBAL general_log = 'ON'; ERROR 1146 (42S02) : Table 'mysql.general_log' doesn't exist
Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
2
votes
1 answer

SELECT queries in MySQL binary_log

I am trying to verify database histories. For that, I need to log and parse read-write accesses to a database. I know MySQL mainly offers two types of logs - general query log and binary log. General query log is not helpful for me since it does not…
rnbguy
  • 1,369
  • 1
  • 10
  • 28
1
vote
2 answers

General Log Move Another Table

Using MYSQL, I want to record my data from the general_log table on server A to a table on server B instantly at every data and delete the data from server A at the end of the day. I tried to use Trigger for this, but the general_log does not allow…
Mert Ayten
  • 13
  • 3
1
vote
0 answers

Mysql general logs not showing database name

I want to use the mysql general logs to list down all the queries executed on my specific database. I see that the database name is mentioned only when the command type is 'Connect'. In the post below, one of the comments is based on the assumption…
magician
  • 61
  • 1
  • 4
1
vote
1 answer

Regex Filter Newline Search

I need to filter the query from a log and it needs look up the newlines and i have stuck in regex filtering the new lines here is the example of the log that i want to filter 139 Connect root@localhost as anonymous on 139 Query SET…
Risa
  • 29
  • 6
0
votes
0 answers

How to just record the special user's action in Mysql's binlog

I want to execute the specific user's modification to the mysql to a mirror database, after research on the search engine, I know I can open turn on the general log config, and select the IDs that produced by the specific user, and map them to…
0
votes
1 answer

MariaDB 10.1.22 on Mac OSX 10.2 - Enable the general query log in my.cnf

I have MariaDB 10.1.22 installed on Mac OSX 10.2. my.cnf is located in /usr/local/etc/my.cnf (it does use that file). This is an example of my default my.cnf # # This group is read both both by the client and the server # use it for options that…
Adamski
  • 839
  • 2
  • 10
  • 28
0
votes
0 answers

mysql general log destination file to table version 5.5

I have mysql server 5.5, I want to change default general file destinahtion (Which is /var/log/mysql/mysql.log) to table. Thanks
user2959423
  • 29
  • 1
  • 5
-1
votes
1 answer

how to count the number of times a statement has been executed in mysql?

I want to sort the results in a descending order of the total number of times each statement has been executed. Statements executed: SELECT CONVERT (argument USING utf8) FROM mysql.general_log WHERE argument LIKE '%SELECT%' OR argument LIKE…
c_minn
  • 1
  • 2