List:General Discussion« Previous MessageNext Message »
From:Tim Dunphy Date:January 14 2012 11:23pm
Subject:delete all hosts using a wildcard
View as plain text  
hello list,

 I have a number of hosts that I would like to delete using a wildcard (%) symbol. 

  Here is the query I am using:
  mysql> delete from mysql.user where user='';
Query OK, 0 rows affected (0.00 sec)

 And I am attempting to delete all the hosts at the domain ''...

 But as you can see I am unsuccessful:

 mysql> select user,host from mysql.user;
| user     | host                        |
| root     |                   |
| repl     | |
| admin    | |
| repl     | |
| repl     | |
| repl     | |

I know I can delete them individually and this is what I am going to do. But I would like
to use this as a learning opportunity to help me understand how the wildcard works. 

Thanks in advance..

Best regards,

delete all hosts using a wildcardTim Dunphy14 Jan
  • Re: delete all hosts using a wildcardPaul DuBois14 Jan
    • Re: delete all hosts using a wildcardTim Dunphy15 Jan
      • Re: delete all hosts using a wildcardClaudio Nanni16 Jan
Re: delete all hosts using a wildcardJan Steinman16 Jan
  • Re: delete all hosts using a wildcardGovinda16 Jan