Refactor mysql role.