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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.