List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:December 2 2011 5:03am
Subject:Re: delete syntax
View as plain text  
well, i am using delete/insert-statements since 10 years to maintain
users since you only have to know the tables in the database "mysql"
and use "flush privileges" after changes

DROP USER is the only SINGLE COMMAND

as long as you do not use table/column-privileges there are exactly
two relevant tables: "user" and "db"

Am 02.12.2011 05:15, schrieb Stdranwl:
> DROP USER command is the only command to remove any user and its
> association from all other tables.....
> 
> On Fri, Dec 2, 2011 at 8:22 AM, Reindl Harald <h.reindl@stripped>wrote:
> 
>> ALWAYS
>> start with "select * from mysql.user where user='mail_admin' and host like
>> '\%';"
>> and look what records are affected to make sure the were-statement works as
>> expected and then use "CURSOR UP" and edit the last command to "delete
>> from"
>>
>> not only doing this while unsure with escapes  protects you against logical
>> mistakes like forget a "and column=1" and get "1000 rows affected" with no
>> way back


Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
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