Is there a way to hide mysql innodb cluster queries from general_log?
There is obviously a whole lot of administrative MySQL noise in the general_log.
You cannot really screen them out. So, what can do you ???
SUGGESTION: USE THE SLOW LOG !!!
The Slow Log ??? Yes, that's exactly what I said : USE THE SLOW LOG !!!
You are probably saying : &quot;Why would I use the slow log when I need to general log ???&quot;
Here is the problem you seem to be facing: you want to hide administrative SQL commands like:
select cluster_type from mysql_innodb_cluster_metadata.v2_this_instance

and
select I.mysql_server_uuid, I.endpoint, I.xendpoint from
mysql_innodb_cluster_metadata.v2_instances I join
mysql_innodb_cluster_metadata.v2_gr_clusters C
on I.cluster_id = C.cluster_id
where C.cluster_name = 'prodcluster'
AND C.group_name = '8a70e310-a997-4d59-8e81-92dab9daa5be'

You can make the slow log behave like the general log by setting this:
SET GLOBAL long_query_time = 0;

Then, everything that executes will land in the slow log.
So, how can you screen out the administrative SQL commands ??? Think about how long it takes for administrative SQL to execute. Try setting this:
SET GLOBAL long_query_time = 0.5;

Once you set this, everything that takes less than 0.5 seconds will not be recorded in the slow log. I am sure administrative SQL commands will not take 0.5 seconds or more to run.
Once you are satisfied that administrative SQL commands are not being recorded in the slow log, go add that setting in the my.cnf file:
[mysqld]
long_query_time = 0.5

or if you are using MySQL 8.0
mysql&gt; SET PERSIST long_query_time = 0.5;

SUMMARY

Disable the general log
Enable the slow log
Run SET GLOBAL long_query_time = 0.5; in mysql
Add long_query_time = 0.5 under [mysqld] in /etc/my.cnf