List:General Discussion« Previous MessageNext Message »
From:Philip Mather Date:November 22 2006 9:13am
Subject:Re: shutdown database but not mysqld
View as plain text  
Dan,
> In the last episode (Nov 22), Alfred Mak said:
>   
>> Can I shutdown one of the databases in MySQL but not the whole mysqld
>> process (i.e. keeping the other databases still running) ?
>>     
>
> "shutdown" would be the wrong word then :)  How about revoking
> permissions (either at the mysql or the filesystem level) ?  You could
> also flush tables, then rename the database directory somewhere out
> mysql's data directory.
I have to admit I've always found it vaguely odd that there's no ability 
to do this, is it on a feature request list somewhere? A simple 
statement like "shut {database}" or close or stop maybe. Perhaps the 
shut would temporarily deny permission to the database for all except 
root, stop could simply lock up all the tables and close would 
completely "unmount" the database in some fashion?

I doubt it would get used too often but I know exactly when it would be 
useful...
"silly developer"> UPDATE staff SET isActive = "N"; where ID = 451 LIMIT 1;
<blind panic />
"system admin"> SHUT stuffedDatabase;

...and yes I have seen something like that happen and no it wasn't me 
typing the first statement. This sort of functionality will be more and 
more important as people start using triggers and other sorts of mischief.

Regards,
    Phil
Thread
shutdown database but not mysqldAlfred Mak22 Nov
  • Re: shutdown database but not mysqldDan Nelson22 Nov
    • Re: shutdown database but not mysqldPhilip Mather22 Nov
  • Re: shutdown database but not mysqldKieran Kelleher22 Nov
    • Re: shutdown database but not mysqldPhilip Mather22 Nov