Mysql persistent backend

This would be simplified also :)