Get first row of each hour

First, get min id of each hour

select min(id), YEAR(mtime), MONTH(mtime), DAYOFMONTH(mtime), HOUR(mtime)
from table
where `mtime` > '2019-11-1 00:00' AND `mtime` < '2019-11-6 00:00'
group by YEAR(mtime), MONTH(mtime), DAYOFMONTH(mtime), HOUR(mtime)

Complete

SELECT a.*
FROM `table` a 
join (
select min(id) as h_id, YEAR(mtime) as h_year, MONTH(mtime) as h_month, DAYOFMONTH(mtime) as h_day, HOUR(mtime) as h_hour
from table
where `mtime` > '2019-11-1 00:00' AND `mtime` < '2019-11-6 00:00'
group by YEAR(mtime), MONTH(mtime), DAYOFMONTH(mtime), HOUR(mtime)
) b on b.h_id = a.id
LIMIT 50