Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2010
    Posts
    122
    Thanks
    6
    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 ";


    $result=mysql_query($sqlstr);

    this not working

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

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,155
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •