Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-06-2011, 09:02 AM #1
- Join Date
- Sep 2010
- Thanked 0 Times in 0 Posts
i want to transefer one server table to another server same name table
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 ";
this not working
plz give me sample query.......................
09-06-2011, 06:26 PM #2
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.An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.