NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Restoring Database through SSH

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 04-21-2005, 02:52 AM THREAD STARTER               #1 (permalink)
Account Suspended
 
Veolus's Avatar
Join Date: Dec 2004
Location: Australia
Posts: 4,309
Veolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud of
 



Restoring Database through SSH


I am trying to restore a 22MB database through phpMyAdmin but it always times out and it seems like it will never finish!

I remember hearing on another forum that you can restore databases through SSH if they were really big.

Does anyone know how i would be able to restore my database through SSH?

I have SSH access..

Thanks in advance
Veolus is offline  
Old 04-21-2005, 10:21 AM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Code:
mysql -hdb3.domain.com -uusername -pXXXXXXXX username_dbname < file.sql

so if your setup is as follows

username - test_uname
password - pass
????: NamePros.com http://www.namepros.com/programming/84096-restoring-database-through-ssh.html
database name - forum
database host - localhost
sql file name - forum.sql

the command would be :-
Code:

Code:
mysql -hlocalhost -utest_uname -ppass forum < forum.sql
Just a note, executing sql on ssh is alot more fussy than using phpmyadmin. Everything has to be 100% syntactically correct.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 04-21-2005, 10:26 AM   #3 (permalink)
Senior Member
 
TheWatcher's Avatar
Join Date: May 2003
Location: KING.NET
Posts: 3,479
TheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud of
 



Originally Posted by filth
Code:
mysql -hdb3.domain.com -uusername -pXXXXXXXX username_dbname < file.sql

so if your setup is as follows

username - test_uname
password - pass
database name - forum
database host - localhost
sql file name - forum.sql

the command would be :-
Code:

Code:
mysql -hlocalhost -utest_uname -ppass forum < forum.sql
Just a note, executing sql on ssh is alot more fussy than using phpmyadmin. Everything has to be 100% syntactically correct.
This is correct. No problem uploading/downloading files via SSH.
????: NamePros.com http://www.namepros.com/showthread.php?t=84096

Goodluck,
Em
__________________
Get your own .CO $28/yr http://NeedName.com
KING.NET Advertise your products and services. Got Facebook, connect with me. http://facebook.com/domainnetwork
WebeW.com - YA.NET Alternative Domain Name!. Use it for your site or blog.
TheWatcher is offline  
Old 04-21-2005, 02:11 PM   #4 (permalink)
NamePros Regular
Join Date: Feb 2005
Posts: 579
abcde is a jewel in the roughabcde is a jewel in the roughabcde is a jewel in the rough
 



If you dont have Shell access, what do you do?
abcde is offline  
Old 04-21-2005, 10:07 PM THREAD STARTER               #5 (permalink)
Account Suspended
 
Veolus's Avatar
Join Date: Dec 2004
Location: Australia
Posts: 4,309
Veolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud of
 



What if the database is in a .gzip file?

Guys, I ran this query through phpMyAdmin:

mysql -hlocalhost -u*username* -p*pass* *db name* < C:\My Documents\My Received Files\ryaz_gfxforum[1].sql.gz

It's still loading.. can anyone tell me if i did it right
Veolus is offline  
Old 04-22-2005, 12:57 AM   #6 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
not 100% sure if you can use gz files to restore a db in ssh but you can always extract the files in ssh anyway.
????: NamePros.com http://www.namepros.com/showthread.php?t=84096

Originally Posted by abcde
If you dont have Shell access, what do you do?
either split the file into chunks or ask your host to do it (upload it into your webspace as well and let them know where it is)
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 04-24-2005, 06:53 AM THREAD STARTER               #7 (permalink)
Account Suspended
 
Veolus's Avatar
Join Date: Dec 2004
Location: Australia
Posts: 4,309
Veolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud of
 



Unfortunately my host doesn't know anything about SSH, they only know how to give me SSH access.
Veolus is offline  
Old 04-24-2005, 07:29 AM   #8 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
Originally Posted by Veolus
Unfortunately my host doesn't know anything about SSH, they only know how to give me SSH access.
what the heck? how do they manage the server :/
????: NamePros.com http://www.namepros.com/showthread.php?t=84096

what youd need to do is if its in a .gz format upload it via ftp to your webspace
then in ssh run this command

Code:
gunzip /path/to/file/blah.sql.gz
then it will unpack the gz and get it back to .sql form.
adam_uk is offline  
Old 04-24-2005, 09:23 AM THREAD STARTER               #9 (permalink)
Account Suspended
 
Veolus's Avatar
Join Date: Dec 2004
Location: Australia
Posts: 4,309
Veolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud ofVeolus has much to be proud of
 



Me and my friend have given up and decided to start over.

All the members have started re-registering and posting and we currently have around 60 or more members It proves that we have some dedicated members

Anyways,

Thanks to everyone who has offered their help I appreciate it alot
Veolus is offline  
Old 04-24-2005, 11:02 PM   #10 (permalink)
NamePros Regular
Join Date: Feb 2005
Posts: 579
abcde is a jewel in the roughabcde is a jewel in the roughabcde is a jewel in the rough
 



i still do not know how to restore using SHH to restore my database to DreamHost server.

Could any1 kind enough to show me step by step.
abcde is offline  
Old 04-25-2005, 06:47 AM   #11 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
do dreamhost give you ssh access?
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database .cc - QDB, MDB, JDB Mencus Domain Appraisals 8 12-16-2004 12:27 PM
Connecting to your SQL Database using Enterprise Manager priyanka[imported] Web Hosting Discussion 1 12-07-2004 04:21 PM
Connecting to your SQL Database using Enterprise Manager priyanka[imported] Webmaster Tutorials 0 12-06-2004 09:58 PM
A Beginner's Guide to Securing Your Server Part 1 of 3 (Security Inside WHM/CPanel) 000000000 Webmaster Tutorials 7 10-09-2004 02:17 PM
help, help, help with phpBB installation seraph Programming 2 10-05-2003 10:05 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:46 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger