The SQLs from RolandoMySQLDBA calculates the buffer pool miss rate.
To calculate the hit rate (in percentage) you need to use the following formula
(Innodb_buffer_pool_read_requests - Innodb_buffer_pool_reads) / Innodb_buffer_pool_read_requests * 100
(Innodb_buffer_pool_read_requests are all logical reads and Innodb_buffer_pool_reads are logical reads that could not be satisfied by the buffer pool and read from disk as explained in the documentation)
The SQLs are therefore for 5.7:
SELECT round ((P1.variable_value - P2.variable_value) / P1.variable_value * 100,4) 'Hit Rate in %',
P2.variable_value 'Physical BP Reads', P1.variable_value 'All BP Reads'
FROM information_schema.GLOBAL_STATUS P1,
information_schema.GLOBAL_STATUS P2
WHERE P1. variable_name = 'innodb_buffer_pool_read_requests'
AND P2. variable_name = 'innodb_buffer_pool_reads';
and for 8.0:
SELECT round ((P1.variable_value - P2.variable_value) / P1.variable_value * 100,4) 'Hit Rate in %',
P2.variable_value 'Physical BP Reads', P1.variable_value 'All BP Reads'
FROM performance_schema.global_status P1,
performance_schema.global_status P2
WHERE P1. variable_name = 'innodb_buffer_pool_read_requests'
AND P2. variable_name = 'innodb_buffer_pool_reads';
Also, FLUSH STATUS does no longer reset those two counters (tested in MySQL 8.0).