Re: delete syntax

2011-12-01 Thread 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 DROP USER is the only SINGLE COMMAND as long as you do not use table/column-privileges there are exactly two relevant

Re: delete syntax

2011-12-01 Thread Stdranwl
DROP USER command is the only command to remove any user and its association from all other tables. Cheers 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

Re: delete syntax

2011-12-01 Thread Reindl Harald
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

Re: delete syntax

2011-12-01 Thread Shiva
You can try delete from mysql.user where user='mail_admin' and host like '\%' ; Note: I haven't tested it and since % is a wildcard you need to escape it. Best, Shiv On Thu, Dec 1, 2011 at 6:09 PM, Tim Dunphy wrote: > Hello Krishna, > > > Thanks but I probably should have noted that I only

Re: delete syntax

2011-12-01 Thread Keith Keller
On 2011-12-02, Tim Dunphy 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

Re: delete syntax

2011-12-01 Thread Tim Dunphy
Hello Krishna, 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

Re: delete syntax

2011-12-01 Thread Krishna Chandra Prajapati
delete from mysql.user where user='mail_admin'; Krishna On Fri, Dec 2, 2011 at 7:23 AM, Tim Dunphy wrote: > hello list, > > I am attempting to delete a user from the mysql.user table without > success. > > mysql> delete from mysql.user where user='mail_admin@%'; > Query OK, 0 rows affected (

delete syntax

2011-12-01 Thread Tim Dunphy
hello list, I am attempting to delete a user from the mysql.user table without success. mysql> delete from mysql.user where user='mail_admin@%'; Query OK, 0 rows affected (0.00 sec) mysql> select user,host from mysql.user where user='mail_admin'; ++---+ | u

Re: best way to copy a innodb table

2011-12-01 Thread Karen Abgarian
Hi, I have a support case with MySQL opened on this subject. Here is what we were able to come up with. 1. Create the table with the primary key and unique key constraints defined but no secondary indexes. 2. Bump up InnoDB logs to 2M and especially memory to the highest there can be.

Re: best way to copy a innodb table

2011-12-01 Thread Miguel Angel Nieto
Hi, You should check pt-archiver. http://www.percona.com/doc/percona-toolkit/pt-archiver.html "The goal is a low-impact, forward-only job to nibble old data out of the table without impacting OLTP queries much." This tool can copy data and insert in another table in chunks of data. The destin

Re: best way to copy a innodb table

2011-12-01 Thread Angela liu
how to break the table into 100,000 chunks? thanks From: Claudio Nanni To: Angela liu Cc: "mysql@lists.mysql.com" Sent: Thursday, December 1, 2011 2:24 PM Subject: Re: best way to copy a innodb table Sure you can, and you should. but in case you also upd

Re: best way to copy a innodb table

2011-12-01 Thread Claudio Nanni
Sure you can, and you should. but in case you also update/delete rows from the first table you have to set up trigger to log changes. if you are lucky (only inserts) then its easier. Cheers Claudio 2011/12/1 Angela liu > Hi, folks: > > > I have a situation: > > A large innodb table t1 with 45

Re: [MySQL] innodb_file_per_table / apple workers and logic

2011-12-01 Thread Karen Abgarian
Even more stuff inline there > > Actually, the gas tank is a good analogy. > > There is limited volume in a vehicle which must contain the tank. In this > analogy, the vehicle must have space for not just fuel but passengers, cargo, > engine, transmission, etc. The fact that the tank may

Re: Use of Swap Memroy

2011-12-01 Thread Reindl Harald
Am 01.12.2011 19:42, schrieb Stdranwl: > Many thanks, I wanted to finalized on RAM requirement for one of my server so > do we > have any calculation method to choose intial RAM? depends on the used storage engines, buffer-pools, data-size etc. with myISAM you need only all per-connection-b

Re: Use of Swap Memroy

2011-12-01 Thread Stdranwl
Many thanks, I wanted to finalized on RAM requirement for one of my server so do we have any calculation method to choose intial RAM? On Fri, Dec 2, 2011 at 12:06 AM, Reindl Harald wrote: > > > Am 01.12.2011 18:56, schrieb Stdranwl: > > Hi, will it help to use swap memory on MYSQL's VM. We are in

Re: Use of Swap Memroy

2011-12-01 Thread Reindl Harald
Am 01.12.2011 18:56, schrieb Stdranwl: > Hi, will it help to use swap memory on MYSQL's VM. We are in planning to > use 10GB RAM and 10 GB as swap on a perticular server? thanx SWAP is always bad and should only be a reserve so normally you should have as much memory as needed for the applicat

Use of Swap Memroy

2011-12-01 Thread Stdranwl
Hi, will it help to use swap memory on MYSQL's VM. We are in planning to use 10GB RAM and 10 GB as swap on a perticular server? thanx

Messed up authentication

2011-12-01 Thread Johan De Meersman
First off, as part of this bit of mayhem I found an answer for the recent (and common) question how to verify if the server is properly started with skip-name-resolve, as there's no status variable for that: if you perform a grant on a hostname instead of an IP, it'll spew a warning at you :-)