Friday, December 2, 2016

MySQL Queries I don't want to forget

Filterable process list

SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST

Replication Commands


show master status;

show slave status\G

Finding old databases

select table_schema, table_name, create_time, datediff( create_time, now()) from tables
   where table_schema like 'filter%' and table_name = 'known_table'
    and  datediff (create_time, now()) <  -7


No comments:

Post a Comment