Login to ssh account

$ ssh loginname@server.hosting.com

Now type following command to import sql data file:

$ mysql -u username -p -h localhost data-base-name <>

If you have dedicated database server, replace localhost name with actual server name or IP address:

$ mysql -u username -p -h databasename < data.sql

OR use hostname such as mysql.kenya.or.ke

$ mysql -u username -p -h mysql.hosting.com database-name <>

If you do not know the database name or database name is included in sql dump you can try out something as follows:

$ mysql -u username -p -h < data.sql

OR use the following command

$ mysql -u username -p

mysql> use databaseName

mysql> source data.sql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.