Select consecutive rows that are in a date range of each other
The logic looks simple at first, but it's quite complicated to get it right. 

Let's have a working solution first, and worry about performance later. Tested at rextester.com:

SELECT t.id, t.dateID, t.name 
FROM  myTab AS t
WHERE 
       ( SELECT b.dateID
         FROM myTab AS b
         WHERE t.name = b.name
           AND b.dateID &lt; t.dateID
         ORDER BY b.dateID DESC
         LIMIT 1
       ) + INTERVAL 1 MONTH  &lt;=  t.dateID    
    OR 
       t.dateID + INTERVAL 1 MONTH &lt;= 
       ( SELECT b.dateID
         FROM myTab AS b
         WHERE t.name = b.name
           AND t.dateID &lt; b.dateID
         ORDER BY b.dateID ASC
         LIMIT 1
       )
 ;


Regarding efficiency: the query will perform rather poorly. An index on (name, dateID, id) will help but the query will still need to do 2 subqueries for each row of the table.