rovided that there isn't a user who already has the privilege SYSTEM_USER SET @hadSystemUserPriv = (SELECT COUNT(*) FROM global_grants WHERE priv = 'SYSTEM_USER');