SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: copy some tables from one to another host

  1. #1
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    copy some tables from one to another host

    Hello,

    I wanted to know weather mysql have any functionality where it is able to transfer some tables to other remote machine db.

    like on my machine i have
    vehicles
    style

    now i wanted to transfer this set of tables to other host's db

    any command line ?is mysqldump is useful in this?? Any pointer will be a great help.

    Regards

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,411
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    mysqldump is exactly what you're looking for

  3. #3
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [QUOTE=stymiee;3719650]mysqldump is exactly what you're looking for[/QUOTEplease give me an example

    i am trying something like

    mysqldump --host=localhost --opt my_com_new VehicleType Style |mysql --host 'host_ip_address' my_com_new VehicleType Style

    error
    Access denied for user: 'root@localhost' (Using password: NO) when trying to connect

    kindly suggest some working example above is my code kindly let me know how can i correct this.

    Regards

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,411
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    You need to also provide your password as the error message suggests.

    See this page for the proper syntax for doing this.

  5. #5
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stymiee View Post
    You need to also provide your password as the error message suggests.

    See this page for the proper syntax for doing this.
    I have done this but not in one command i am making dump file first and then in second command running it.

    now i can try to make single one command . too

    anywayz thanks a lot for helping me on time .

Bookmarks

Posting Permissions

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