Re: Disable DB without deleting data

2012-07-20 Thread Andrew Moore
Or rename the users themselves. This backs onto the revoke idea. If only the DBA knows the new names then the privileges stay intact and the old usernames could be restored with a reversal script when the db can be accessed again. Applications will simply get an access denied at connection time. No

Re: Disable DB without deleting data

2012-07-20 Thread Reindl Harald
the permissions are in the "mysql" database so there are two possibilites * mysql is not interested and do not touch them at all means they are still for the old names and work after rename beack as before * mysql does magic and update the permission-tables i bet case one will happen and thi

Re: Disable DB without deleting data

2012-07-20 Thread Kirk Hoganson
Would this keep permissions intact? I need something that would make it easy to automatically restore the database including any custom permissions? Thanks again for the input, Kirk On 07/20/2012 12:16 PM, Rick James wrote: No. RENAME DATABASE does not exist. It may have something to do wit

Re: Disable DB without deleting data

2012-07-20 Thread Reindl Harald
http://dev.mysql.com/doc/refman/5.1/en/rename-database.html This statement was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23 well, as said: dump and delete or revoke permissions Am 20.07.2012 20:16, schrieb Rick James: > No. RENAME DATABASE does not exist.

RE: Disable DB without deleting data

2012-07-20 Thread Rick James
No. RENAME DATABASE does not exist. It may have something to do with internal table numbers in InnoDB. Instead... CREATE DATABASE new ...; RENAME TABLE old.t1 TO new.t1, ... DROP DATABASE old; This should work cross-device. > -Original Message- > From: Reindl Harald [mailto:h.rei...@the

Re: Disable DB without deleting data

2012-07-20 Thread Reindl Harald
Am 20.07.2012 11:20, schrieb Johan De Meersman: > > - Original Message - >> From: "Reindl Harald" >> >> impossible with innodb >> >> * dump >> * delete >> >> with myisam you could stop the server and move the databasedir >> do not try this with innodb even with innodb_file_per_table! >

Re: Disable DB without deleting data

2012-07-20 Thread Johan De Meersman
- Original Message - > From: "Reindl Harald" > > impossible with innodb > > * dump > * delete > > with myisam you could stop the server and move the databasedir > do not try this with innodb even with innodb_file_per_table! Mmh, it should be pretty easy to write a small script that cr