Solved

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

Posted on 2008-10-31
2
838 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Patch Management is administrated by page 129 of  the following document:     http://support.dell.com/support/edocs/software/smdmc/11/en/ug/ug.pdf However, there are issues with Patch Management with FTP (for instance, a slow Internet connectio…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now