zcat /Backup/Latest/alba2_2009-03-10_00h45m.Tuesday.sql.gz | mysql -h
192.168.0.224 -u root -p alba2

Cheers

Claudio



2009/3/11 Rob Wultsch <wult...@gmail.com>

> On Tue, Mar 10, 2009 at 7:16 PM, René Fournier <m...@renefournier.com>
> wrote:
>
> > OK, I've managed to do the same thing with just the mysql command line
> > program:
> >
> >        mysql -h 192.168.0.224 -u root -p alba2 <
> > /Backup/Latest/alba2_2009-03-10_00h45m.Tuesday.sql
> >
> > Works great. However, the sql file is normally gzipped, so.... Can I
> ungzip
> > the file on the fly (and without removing the .gzip version) and pipe the
> > contents as I did above? (Yes, I'm UNIX-impaired.)  Something like:
> >
> >        mysql -h 192.168.0.224 -u root -p alba2 < gzip -dc
> > /Backup/Latest/alba2_2009-03-10_00h45m.Tuesday.sql.gz
> >
> > But so that it works...
> >
> > ...Rene
>
>
> Pipe is your friend. You probably want something like:
>
> gzip -dc /Backup/Latest/alba2_2009-03-10_00h45m.Tuesday.sql.gz
> | mysql -h 192.168.0.224 -u root -p alba2
>

Reply via email to