From: Claudio Nanni Date: December 2 2011 8:59pm Subject: Re: delete syntax List-Archive: http://lists.mysql.com/mysql/226430 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e651f41611f69b04b3223d90 --0016e651f41611f69b04b3223d90 Content-Type: text/plain; charset=ISO-8859-1 2011/12/2 Reindl Harald > 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 > > The privileges should be maintained only using the designated commands. You cannot rely on the knowledge you have of the underlying implementation which can change anytime , while the privileges command are standard. *Cheers* Claudio Nanni > 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 >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 > > -- Claudio --0016e651f41611f69b04b3223d90--