MySQL stored procedure create database by month
I would advice you to take a look at partitioning if you are running a recent version of MySQL and see if this could solve your problem. 

Partitioning does not result in a smaller database but offers many of the same benefits with less administration once it is set up, and you will still have access to historic data.