From: sheeri kritzer Date: February 20 2006 5:22pm Subject: Re: (mysqldump) Serial output. . .? List-Archive: http://lists.mysql.com/mysql/194987 Message-Id: <24cb9b4b0602200922l54330fbaw24dee2eba3c2774b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable mysqldump takes a table or database and "dumps" it -- current schema, current data. You won't get alter tables. What you want is something that will show all the alter statements.=20 You can run something like this on unix: tail -f binlog* | grep ALTER > alter.sql and then the alter.sql text file will always have the alter statements. The binary log captures the alter statements. Or, you could create an 'alteration' table with a text field and timestamp, and have a trigger copy the alter statement to the alteration table. But mysqldump is the wrong solution, because it only dumps "now". hope this helps! -Sheeri On 2/16/06, mwilliams wrote: > All, > > I'm looking to output every piece of data from the database line by line.= Is there any > methody by which 'mysqldump' can output the following?: > > > use MY_DATABASE; > > CREATE TABLE IF NOT EXISTS MY_TABLE; > > ALTER IGNORE TABLE MY_TABLE ADD MY_COLUMN [properties] > ALTER IGNORE TABLE MY_TABLE ADD MY_COLUMN [properties] > ALTER IGNORE TABLE MY_TABLE ADD MY_COLUMN [properties] > ALTER IGNORE TABLE MY_TABLE ADD MY_COLUMN [properties] > ALTER IGNORE TABLE MY_TABLE ADD MY_COLUMN [properties] > ALTER IGNORE TABLE MY_TABLE ADD MY_COLUMN [properties] > ALTER IGNORE TABLE MY_TABLE ADD MY_COLUMN [properties] > > INSERT IGNORE . . . . > INSERT IGNORE . . . . > INSERT IGNORE . . . . > INSERT IGNORE . . . . > INSERT IGNORE . . . . > INSERT IGNORE . . . . > INSERT IGNORE . . . . > > > > The most important of the features above are the ability to CREATE a tabl= e only if it doesn't > exist (I never want to drop because the same script will be used for sync= ing) and the ability to > have 'mysqldump' be "smart" and output ALTER IGNORE statements. Any asis= tance would be > greatly appreciated. > > Regards, > Michael > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dawfief@stripped > >