s.prema@yahoo.com Posted February 11, 2010 Share Posted February 11, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/191774-importing-sql-file-into-a-remote-server-from-another-server/ Share on other sites More sharing options...
jskywalker Posted February 13, 2010 Share Posted February 13, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/191774-importing-sql-file-into-a-remote-server-from-another-server/#findComment-1011767 Share on other sites More sharing options...
s.prema@yahoo.com Posted February 15, 2010 Author Share Posted February 15, 2010 No I m not working on remote host 222.222.222.222, working with my source server 233.223.33.33 now tell wat to do Quote Link to comment https://forums.phpfreaks.com/topic/191774-importing-sql-file-into-a-remote-server-from-another-server/#findComment-1012453 Share on other sites More sharing options...
trq Posted February 15, 2010 Share Posted February 15, 2010 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; Quote Link to comment https://forums.phpfreaks.com/topic/191774-importing-sql-file-into-a-remote-server-from-another-server/#findComment-1012454 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.