Solved

run a bash file to connect to remote server an execute an sql file

Posted on 2008-10-31
2
840 Views
Last Modified: 2010-04-21
I need to be able to run a bash file to connect to remote server an execute an sql file
0
Comment
Question by:SaltyDawg
2 Comments
 
LVL 29

Accepted Solution

by:
fosiul01 earned 500 total points
ID: 22853465
I guess its like this
#!/bin/bash

scp database.sql username@hostname:/databasedump/database.sql
ssh username@hostname:
mysql --user=mylogin --password=mypass MyDatabse < database.sql
0
 
LVL 1

Author Closing Comment

by:SaltyDawg
ID: 31512172
Thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Usually shares are where we want them for our users and we tend to take them for granted. There are times, however, when those shares may disappear causing difficulty for your users. One of the first things to try is searching for files that shou…
Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question