How do I restore a database using SSH? -- Reseller Hosting FAQ

How do I restore a database using SSH? < MySQL Questions < Main Page
How do I restore a database using SSH?
Author: Drew

First, you'll need to log into your account via a secure shell client like Putty or SecureCRT. Once there, you'll need to enter the following command: mysql $databasename -u $user -p$password < /path/to/$dump_file You'll need to substitute the correct information for the $variables in the line above. For instance, let's say that you have uploaded your database backup, calld backup.sql, to your public_html directory. Your account username is 'jack' and you are looking to restore a database called 'jack_phpbb', which is accessed by the user jack_forums and a password of blahblah. This is what the line would look like: mysql jack_phpbb -u $jack_forums -p$blahblah < /home/jack/public_html/backup.sql If you don't know the database username or password, you'll need to check the Mysql screen in Cpanel to get that information. Please note that there is purposely no space between the -p and the password when you enter this line. That is the way the line is supposed to be entered.


Last Modified: 2006-12-16         Number of views: 4856

Print This Save This E-mail This Talk About This ( 1 )

   

There are no user added comments for this article.  
Was this article helpful?
 
Yes
No
 
Related Articles
What are my default FTP account settings?
Your account (and for resellers, every account you create from your WHM account) comes with default ...
What is anonymous FTP and how do I use it?
Anonymous FTP allows you, and others you give permission to, to access your \"public_ftp\" folder. Y...
What is SSH?
SSH is a secure replacement for telnet, allowing you to have shell access to your Lightning Servers ...


Search Articles
View Category

 View: Most Viewed  |  Most E-mailed  |  Most Printed  |  Most Saved

Lightning Support is a reseller hosting knowledge base for Lightning Servers
Copyright © 2010 Hosting Ideas, LLC