Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Non destructive update of MySQL database
- Date: Sun, 25 Mar 2007 14:36:22 +0900
- From: Brett Robson <b-robson@example.com>
- Subject: Re: [tlug] Non destructive update of MySQL database
- References: <4605BB7E.5060207@example.com>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707
Dave M G wrote:
All I need to do is have new tables and columns added to the existing database structure. Columns or tables deleted in the "source" database don't need to be deleted in the web databases.
Updating a live database is a serious task and would usually mean carefully hand coded scripts.
This will no work if tables or columns disappear from the live DB and will result in a small downtime.
1 create a temp DB using the structure from the dev DB 2 shutdown the live DB 3 populate the temp DB with the data from live database 4 copy the temp DB files into the live DB (after a backup!) 5 start the live DB
Step 3 is the key. The sqldump produces a series of insert statements. I haven't done this but I'm pretty sure it will work.
Brett
- References:
- [tlug] Non destructive update of MySQL database
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Crontab not executing
- Next by Date: Re: [tlug] Adding text to the beginning of a file
- Previous by thread: Re: [tlug] Non destructive update of MySQL database
- Next by thread: Re: [tlug] Non destructive update of MySQL database
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links