Score:0

MySQL Access log query Execution

in flag

We are trying to upgrade our MySQL servers from 5.7.26 to MySQL 8. We want to test all the queries which were executed in say 48 hours in the old MySQL instance, To execute on a new Instance with MYSQL 8 and capture errors if any. There are millions of queries got executed in the past 48 hours, What will be the best possible solution to achieve what we are looking for?

Score:1
ru flag

To show the queries log in MySQL below steps can be followed:

  1. Enable Query logging on the database. SET global general_log = 1; SET global log_output = 'table';
  2. Now you can view the log by running this query: SELECT * FROM mysql. general_log;
  3. If you want to disable query logging on the database, run this query: SET global general_log = 0;

You can refer to doc[1] to know more informationm about MySQL 8.0

[1] https://dev.mysql.com/doc/refman/8.0/en/query-log.html

ua flag
Another thing: Dump the data just before turning on the General log -- so that you can start from the same dataset. (There are multiple ways to do this; research it further.)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.