On Tue, 29 Mar 2005, Shamim Shaik wrote: > Can I run load data from master on myisam tables where my table size is > approx 30G? > > Is there a better way to do this ?
Hi, 1) LOAD DATA FROM MASTER: From the manual: " It acquires a global read lock on the master while taking the snapshot, which prevents updates on the master during the load operation." 2) mysqldump: Unless you specify that mysqldump acquires a lock on the tables, the data on the slave will not be consistent with the master. Neither of the above will work for you since your database cannot be down for an extended period and if you require that your data is consistent on both master and slave. However, depending on your setup, this may work: 1) Create a new database (say <db>_tmp), identical to the one you need replicated but with no data (see the --no-data option to mysqldump for instance). 2) Swap the two databases so that the newly created empty DB becomes active and turn on binary logging. 3) Copy the inactive database to your slave. 4) Make a copy of the binlogs created while the copy was taking place. Swap the two databases again; reset the master; set up replication to the newly seeded slave. 5) Using mysqlbinlog, feed the data that was updated during the copy to the live database. Around step #4 you also probably want to deny any updates from your system while the binlogs are being processed in order to maintain consistency in your dataset. I haven't tried this approach myself so keep that in mind as I may have missed some steps while plotting it out in my head; I would suggest trying this out in a test environment first. Let us know how it works out if you decide to try it out. Atle - Flying Crocodile Inc, Unix Systems Administrator -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]