GoPantheoN
Active Member
i am a noob in ssh so guys tell me frm first step to last in restoring a database thro ssh in cpanel
edit : ssh is enabled in that cpanel
edit : ssh is enabled in that cpanel
You will need the database username, password and database name, and putty
After you ssh into OLD server, type "mysqldump -u USER_NAME -p DB_NAME | gzip > FILE.sql.gz"
Enter the database password when it asks. Then, usinf FTP or sFTP, copy the FILE.sql.gz file from the OLD server to the NEW server. (Presumably by copying it from OLD server to your PC and then to NEW server.)
After you ssh into NEW server, type "gunzip < FILE.sql.gz | mysql -u USER_NAME -p DB_NAME"
Enter the database password when it asks. When it is done, your database will be copied to the new server.
Restoring . ssh to new host (make sure the database actually exists!)
mysql database -uusername -p < database.sql
or simply mysql database -uusername -p
enter password
source database.sql
PM me if you need more help.