List:General Discussion« Previous MessageNext Message »
From:Keith Keller Date:December 2 2011 2:41am
Subject:Re: delete syntax
View as plain text  
On 2011-12-02, Tim Dunphy <bluethundr@stripped> wrote:
>  
> Thanks but I probably should have noted that I only want to delete the wildcard user.
> There are other users I would prefer to not delete.
>
> mysql> select user,host from mysql.user where user='mail_admin';
> +------------+-----------------------+
>| user       | host                  |
> +------------+-----------------------+
>| mail_admin | %                     |
>| mail_admin | 127.0.0.1             |
>| mail_admin | localhost             |
>| mail_admin | localhost.localdomain |
> +------------+-----------------------+
> 4 rows in set (0.00 sec)

This is just a regular table with a user and host column.  If you wanted
to delete the localhost row, you'd do

delete from mysql.user where user='mail_admin' and host='localhost';
flush privileges;

You'd need to flush privileges because you're munging the user table.
But it's probably much better to use the DROP USER command.

--keith


-- 
kkeller-usenet@stripped
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information


Thread
delete syntaxTim Dunphy2 Dec
  • Re: delete syntaxKrishna Chandra Prajapati2 Dec
    • Re: delete syntaxTim Dunphy2 Dec
      • Re: delete syntaxShiva2 Dec
        • Re: delete syntaxReindl Harald2 Dec
          • Re: delete syntaxStdranwl2 Dec
            • Re: delete syntaxReindl Harald2 Dec
              • Re: delete syntaxClaudio Nanni2 Dec
                • Re: delete syntaxReindl Harald2 Dec
                  • Re: delete syntaxGovinda2 Dec
                    • How to get a specific number of entries per one key ?Blog Tieng Viet3 Dec
                      • Re: How to get a specific number of entries per one key ?Arthur Fuller3 Dec
                        • Re: How to get a specific number of entries per one key ?Rik Wasmus5 Dec
    • Re: delete syntaxKeith Keller2 Dec