Dynadot โ€” .com Transfer

Restoring Database through SSH

SpaceshipSpaceship
Watch

Veolus

Account Closed
Impact
13
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:)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
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.
 
0
•••
filth said:
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.

Goodluck,
Em
 
0
•••
If you dont have Shell access, what do you do?
 
0
•••
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
 
0
•••
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.

abcde said:
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)
 
0
•••
Unfortunately my host doesn't know anything about SSH, they only know how to give me SSH access.
 
0
•••
Veolus said:
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 :/

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.
 
0
•••
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 :D

Anyways,

Thanks to everyone who has offered their help :tu: I appreciate it alot ;)
 
0
•••
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.
 
0
•••
do dreamhost give you ssh access?
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back