#!/bin/bash DB=$1 shift TABLES=$* ssh -C colin@db2 "mysqldump -u root --password='heLL&*()0' --skip-lock-tables $DB $TABLES > /tmp/load.sql && gzip -c /tmp/load.sql" > /tmp/load.sql.gz && gunzip -c /tmp/load.sql.gz | mysql -u root $DB Tags: Code mysql Add new comment Your name Subject Comment * More information about text formats Text format Filtered HTMLPlain text Filtered HTMLWeb page addresses and e-mail addresses turn into links automatically.Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <pre>Lines and paragraphs break automatically.Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or class="OPTIONS" [title="the title"].Plain textNo HTML tags allowed.Web page addresses and e-mail addresses turn into links automatically.Lines and paragraphs break automatically. By submitting this form, you accept the Mollom privacy policy.
Add new comment