The equivalent of Common Table Expressions in MySQL
Onetime action:  Build a table with lots of dates-- a la DatesTable.  (This can be done with a cross join to help generate lots of numbers, then use + INTERVAL n DAY for turning into dates.)

Then LEFT JOIN (with a WHERE clause) from the DatesTable to the other table(s).

Note that you will need to rewrite most date operations because of different syntax.

With MariaDB, you can use a pseudo table like seq_1_to_1000 to get a bunch of numbers.  Also, MariaDB has CTEs.  (MySQL will be getting CTEs sometime in version 8.0.)