cannibal
01-06-2004, 04:12 AM
Hi all
can you right for me the SSH command to transfer DB from server to another server.
thanks....
can you right for me the SSH command to transfer DB from server to another server.
thanks....
![]() | View Full Version : SSH command for transfer database cannibal 01-06-2004, 04:12 AM Hi all can you right for me the SSH command to transfer DB from server to another server. thanks.... coight 01-06-2004, 04:13 AM mysqldump -u username -p database_name > dumpfile.sql wget URL cannibal 01-06-2004, 04:15 AM Thanks for the fast reply but what if I don't have SSH root access on the old server ?? THB-Mark 01-06-2004, 04:41 AM Hi, You shouldn't need root access to the old server, all you need is the database username and password and that should let you dump the database. Mark cannibal 01-06-2004, 04:56 AM But how the SSh knows if the dumpfile.sql is from the old server ?? MjrGaelic 01-06-2004, 05:39 AM If I understand correctly, your on server a, wanting to pull a database off of server b, but don't have ssh access to server b? If you don't have means to access your raw database on server b you're sol. Twoud be a very very bad day for the security industry of any ol' user could pull databases remotely. Other options might be phpMyAdmin which works via FTP access, you need only know the database user/pass info and of course have ftp access to server b. From phpMyAdmin (Open source, just google it) you can extract your database in a plain text format which you can then import to server A after uploading it to server A. Regards and good luck Ryan THB-Mark 01-06-2004, 06:47 AM Hi, I think you need to explain a little more on exactly what you are trying to do here. Do you have any type of SSH access on the old server? cannibal 01-06-2004, 09:40 AM I have reseller account now I want to transfer my clients DB to my new server as we now there is no root access to resellers so how can I write mysqldump -u username -p database_name > dumpfile.sql If I wrote it from my new server how the server will now from where this DB coming ?? Thanks to you all for trying to help me.....:) THB-Mark 01-06-2004, 09:41 AM Hello, You can't do it that way. You must have access to the old server in order to get a dump of the database. Huminie 01-06-2004, 11:42 AM On the 'old' server you will need to download the database...using phpmyadmin works well for this. Then upload the database to your new server. FTP would work. Then via ssh on the new server, navigate to the directory where you uploaded the database to and run the command listed above. I have done this a few times lately and it works well. Hope this helps. cannibal 01-07-2004, 02:32 AM Originally posted by Huminie Then upload the database to your new server. FTP would work. where should I upload the database ? I mean in which folder ?? thanks nmluan 01-07-2004, 03:38 AM Cannibal, When you dump the database like instructed above, the result will be a .sql file on your "old" server. You can then move this file to an web-accessible folder on your "old" server. You will then have to ssh to your "new" server and wget <url of the file> to get that database file downloaded to your "new" server. If you don't have a web accesible folder on your old server or you just want things to be more secure, you can try "scp" that file to your new server (the scp command must be run on your old server) -old-server$ scp thefile.sql username@<newserver IP>:thefile.sql ML Huminie 01-07-2004, 10:42 AM Originally posted by cannibal where should I upload the database ? I mean in which folder ?? thanks You can just upload it to your normal webspace...anywhere you have access to on the server. It doesn't matter where on the server, as long as you can get to that directory when you have ssh'd to the server. |