Restore a database to dedicated server

Description of your first forum.
Post Reply
dylanjonathan147
Posts: 7
Joined: Thu Jan 22, 2015 4:42 pm

Restore a database to dedicated server

Post by dylanjonathan147 » Wed Sep 02, 2015 10:36 pm

Hello all,

I am not able to restore my database to server via ssh.Anybody know
how to restore a database to dedicated server through SSH.

Thanks

brownbenjamin4
Posts: 7
Joined: Thu Jan 22, 2015 4:29 pm

Re: Restore a database to dedicated server

Post by brownbenjamin4 » Fri Sep 04, 2015 3:46 pm

First logged in to dedicated server as root via SSH, and then go to the folder where we want to put the file of database. Once in it, type the following command to import it into the selected database:

mysql DATABASE_NAME < BACKUP.sql

DATABASE_NAME is replacing with the actual name of the database into which we want to save the backup.

mahsharghasemiyeh
Posts: 10
Joined: Wed Jan 21, 2015 4:55 pm

Re: Restore a database to dedicated server

Post by mahsharghasemiyeh » Sat Oct 30, 2021 10:55 am

Database backup for non-cPanel servers

1. Log into SSH; 
2. Find the backup folder; 
3. Once inside, type mysql DATABASE NAME BACKUP.sql, replacing DATABASE NAME with the database to which this backup will be restored.

Database backup for cPanel servers
1. log into your SSH
2. mysql -uUsername -pPassword -H localhost database name database backup.sql 

johnsonisabella582
Posts: 10
Joined: Thu Jan 22, 2015 3:36 pm

Re: Restore a database to dedicated server

Post by johnsonisabella582 » Mon Dec 13, 2021 4:59 am

Step 1: Using SSH, connect to your dedicated hosting server as root.

Step 2: Locate the MySQL database dump file.

Step 3: Once inside, manually execute the command below to import it into the database of your choice.

Post Reply