Read tasks from MySQL