List:Replication« Previous MessageNext Message »
From:Rick James Date:May 17 2012 11:10pm
Subject:RE: [SOLVED] Re: maintain mysql session on bash script
View as plain text  
"parallelize"?  Any dumper will be I/O bound.  Splitting it into parallel threads cannot
make the disk(s) run any faster.

> -----Original Message-----
> From: muzazzi@stripped [mailto:muzazzi@stripped] On Behalf Of Andrew
> Garner
> Sent: Thursday, May 17, 2012 1:15 PM
> To: ron ramos
> Cc: replication@stripped
> Subject: Re: [SOLVED] Re: maintain mysql session on bash script
> 
> That solution looked way too complicated for what it's trying to
> accomplish.  In bash, it's probably easiest to just use the built-in
> SYSTEM functionality in the mysql command:
> 
> mysql> FLUSH TABLES WITH READ LOCK;
> mysql> SYSTEM <create a snapshot>;
> mysql> UNLOCK TABLES;
> # rest of bash script
> 
> For <create a snapshot> this might be "lvcreate --snapshot ..." for
> LVM, or ec2-create-snapshot or something similar.   You could also run
> mysqldump commands under this lock - although it may be more difficult
> to test for success or failure.  I note, however, that the
> dba.stackexchange answer doesn't check for errors at all either.
> 
> If you really want to parallelize mysqldump runs you probably want to
> look at something like http://www.mydumper.org/ instead.
> 
> ~Andrew
> 
> On Thu, May 17, 2012 at 1:56 PM, ron ramos <nhadie@stripped> wrote:
> > Hi All,
> >
> > I tried but failed on using mkfifo, but i found another way:
> >
> > http://dba.stackexchange.com/questions/8587/mysql-db-backup-
> excluding-
> > specific-tables/8613#8613
> >
> > hopefully this will help others. thanks again for your suggestions!
> >
> > Regards,
> > Ron
> >
> >
> > On Wed, May 16, 2012 at 3:26 PM, tariq wali <ganaiwali@stripped>
> wrote:
> >> I would simply do this on a screen cmd and detach the screen to come
> >> back to shell  and screen -r screename to come back to mysql promt .
> >>
> >> On Tue, May 15, 2012 at 7:03 PM, ron ramos <nhadie@stripped> wrote:
> >>>
> >>> thank you, i will give this a try.
> >>>
> >>> regards,
> >>> Ron
> >>>
> >>> On Mon, May 14, 2012 at 9:42 PM, Johan De Meersman
> >>> <vegivamp@stripped>
> >>> wrote:
> >>> >
> >>> >
> >>> > ----- Original Message -----
> >>> >> From: "Jonathan von Schroeder" <sternkinder@stripped>
> >>> >>
> >>> >> my solution is to connect Mysql's input to a fifo, thus
> keeping
> >>> >> the
> >>> >
> >>> > Yep, that's pretty much the way to do it. Bash 4.0 has introduced
> >>> > this mechanism more formally - it now supports coprocesses.
> >>> > Haven't played with it yet, though.
> >>> >
> >>> >
> >>> > --
> >>> > Bier met grenadyn
> >>> > Is als mosterd by den wyn
> >>> > Sy die't drinkt, is eene kwezel
> >>> > Hy die't drinkt, is ras een ezel
> >>>
> >>> --
> >>> MySQL Replication Mailing List
> >>> For list archives: http://lists.mysql.com/replication
> >>> To unsubscribe:    http://lists.mysql.com/replication
> >>>
> >>
> >>
> >>
> >> --
> >> Tariq Wali.
> >>
> >
> > --
> > MySQL Replication Mailing List
> > For list archives: http://lists.mysql.com/replication
> > To unsubscribe:    http://lists.mysql.com/replication
> >
> 
> --
> MySQL Replication Mailing List
> For list archives: http://lists.mysql.com/replication
> To unsubscribe:    http://lists.mysql.com/replication

Thread
[SOLVED] Re: maintain mysql session on bash scriptron ramos17 May
  • Re: [SOLVED] Re: maintain mysql session on bash scriptAndrew Garner17 May
    • RE: [SOLVED] Re: maintain mysql session on bash scriptRick James17 May
      • Re: [SOLVED] Re: maintain mysql session on bash scriptAndrew Garner17 May
      • Re: [SOLVED] Re: maintain mysql session on bash scriptMarcus Bointon17 May