update ref to mysql