Jump to content

Importing sql file into a remote server from another server


s.prema@yahoo.com

Recommended Posts

Hello

 

Actually I tried the following to export db and store the sql file in my source server,

mysqldump  -u admin -p instglive  > /home/admin/public_html/test/storage/s.sql

this is working fine.

 

But now I need to import this sql file onto a remote server from my source server,

what will be the command to work on putty????

In this following command where to mention the remote IP or remote path,

mysql  -h 222.22.22.22 -u dev -p  instglive < /home/dev/public_html/test/instglive

 

Its urgent.

Thank u

if you are working on your remote system (222.222.222.222) via putty  than you do not have to specify the "-h 222.222.222.222"

 

You should copy (using ftp, of scp) the export to the system where it need to be imported, and than you can run

 

mysql -u username -p  <export.sql

You need to make sure the user you are connecting with has permissions to connect from 233.223.33.33. eg;

 

CREATE USER 'dev'@'233.223.33.33' IDENTIFIED BY 'instglive';
GRANT ALL PRIVILEGES ON *.* TO 'dev'@'233.223.33.33' WITH GRANT OPTION;

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.