List:General Discussion« Previous MessageNext Message »
From:Philip Mather Date:November 22 2006 12:57pm
Subject:Re: shutdown database but not mysqld
View as plain text  
Kieran,
> Just make a backup of the database to a file using mysqldump and then 
> drop the database. If you need to recreate it again in the future, you 
> can use the mysqldump backup file.
Oh indeed, but if you got a "x"GB  database that's not exactly going to 
be quick. I'm thinking of instead of slapping your "This site is 
currently down for maintenance" page up and recovering from your nightly 
mysqldump you'd lock out one database and recover that whilst possibly 
retaining some site functionality. Although if your that bothered you'd 
just have two sync'ed databases loaded at all times on the same server 
and a simple application level switch over script. In fact I've already 
got all that but for a site that uses a snapshot of a larger Oracle 
database, let's me swap snapshots over without bothering the users.

I suppose it's got limited uses and introduces the probably high 
likelihood of some poor fool typing "lock {databaseName}" instead of 
"lock {tableName}" which could be catastrophic in itself.

Forget I mentioned it ;^)

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