At 13:23 +1100 12/11/02, Stephen Brownlow wrote:
>"Egor Egorov" <egor.egorov@stripped> wrote on December 05, 2002:
>> What do you mean "disable database"?
>Ask the MySQL server to Flush it, then not access its tables until further
>> You can't "turn off" the database..
>Can this please be written? It offers big benefits for little effort.
Mmm, how do you know how much effort it would be?
Have you implemented it?
>> You can make backup of the database and then drop the database..
>> Why do you want to do it?
>We have a similar need.
>We have a client with 16 branches.
>Each branch runs the same software, using the same server.
>Each branch has its own database.
>When maintenance is necessary, it would be far better to be able to:
>1. turn off one database,
>2. use myisamchk, Unix or other applications to adjust it in any way,
>3. turn it back on.
>That way, the other 15 branches can continue normal operations while the
>maintenance occurs on the one.
Write a client that flushes all the tables, then places a write lock
on them all. That will keep anyone else from modifying them.
Run myisamchk. When it's done, flush the tables again and unlock them.