In this tutorial we will import a database using ssh in linux centos. To do that you will have to locate your wp-config.php file and open it. In this file you should find the db name, db user, db password and other things which help wordpress to work, but for this tutorial we need only those.
Import Database Using SSH Linux CentOS
To do that we have to open Putty, if you don’t have in your computer, you can download it just go on google and type download putty. Open putty and in Hostname field add your server IP address or just your domain name and hit Open. A black window should open and there you will have to add your username and password. Mostly the username will be root.
Once logged in with root access you have to write the following command:
mysql -u your_username -p your_databasename < mysql.sql
Hit enter, then you will have to add the password for database, the one from your wp-config.php file. That’s all you have to dom now you should wait few minutes that’s depends on how big is your database but usually takes few minutes. Now, you can check the database in your phpmyadmin, in order to see if you have all the data there. Let me know if you need any help.