addmin mysql support and add saving of pos.