I am trying to remove all users from mysql.user except users "1" and "2";
I executed this command, but also deleted the user "1" and "2";
mysql> delete from mysql.user where user!='1' or user!='2';
I also tried
mysql> delete from mysql.user where (user!='1' or user!='2');
same result, user '1' and '2' are deleted.
user2227660
source share