...

View Full Version : i want to transefer one server table to another server same name table



coolumanga
09-06-2011, 09:02 AM
hi i want to transefer one server table to another server same name table

i have Cost_Main table in the server1

i want to transfer Cost_Main of server1 to Cost_Main to localhost

hear i have query

mysql_connect("server1", "Admin", "123456") or die(mysql_error());
mysql_select_db("firefox") or die(mysql_error());



$sqlstr="SELECT * INTO 127.0.0.1.firefox.Cost_Main
FROM Cost_Main As Cost_Main_11 ";


$result=mysql_query($sqlstr);

this not working

plz give me sample query.......................

Old Pedant
09-06-2011, 06:26 PM
Well, for starters, don't use PHP to do this.

Use a database administration tool of some kind. Where you will get both help and more meaningful error message than your PHP code (especially the code you show) will give you.

Anyway, the usual way to do this is via mysqldump (a utility program that is part of all MySQL distributions). And most (all?) DB admin tools will have a way to invoke the dump. You then transfer the dump file to your other server and load the table data from the dump file.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum