Mysql persistent backend

And no more forEach!