SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member djdubuque's Avatar
    Join Date
    Nov 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Importing table data from one dB to another

    I have a dB on another server and it contains data I need on another host. How can I import that data into my new sites database?

    They have the same table name, but there other tables are not the same.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,022
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    which database system are you using?
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member djdubuque's Avatar
    Join Date
    Nov 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    which database system are you using?

    MySQL

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,022
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    okay, just for your information, we have a mysql sub-forum for mysql questions (i'll ask the moderators to move this thread over)

    use mysqldump to create a dump file from the source database, and then use this file to create the tables in the target database

    alternatively, if you have access to a front end app like phpmyadmin, the dump and restore features are built in
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Member djdubuque's Avatar
    Join Date
    Nov 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    okay, just for your information, we have a mysql sub-forum for mysql questions (i'll ask the moderators to move this thread over)

    use mysqldump to create a dump file from the source database, and then use this file to create the tables in the target database

    alternatively, if you have access to a front end app like phpmyadmin, the dump and restore features are built in
    I can only do an export from the source dB. It will export to a CSV file.

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,022
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by djdubuque View Post
    It will export to a CSV file.
    do you have a front end app like phpmyadmin? they can all import csv files
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  7. #7
    SitePoint Member djdubuque's Avatar
    Join Date
    Nov 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    do you have a front end app like phpmyadmin? they can all import csv files

    Yes, the target site has phpmyadmin

  8. #8
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you heard of SqlYog GUI for mysql and it's tunneling feature? If yes then it definitely helps u alot.
    For more info:http://www.devx.com/security/Article/27854/1954

  9. #9
    SitePoint Member djdubuque's Avatar
    Join Date
    Nov 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by PHPycho View Post
    Have you heard of SqlYog GUI for mysql and it's tunneling feature? If yes then it definitely helps u alot.
    For more info:http://www.devx.com/security/Article/27854/1954

    This is a small program like Navicat, I have programs that will open dB's but my problem is that the source host doesn't have a remote login capability only export.

  10. #10
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by djdubuque View Post
    This is a small program like Navicat, I have programs that will open dB's but my problem is that the source host doesn't have a remote login capability only export.

    That is why tunnenning will help.
    The idea is you upload a php file prorided with your app (navicat for instance) and set up the navicat client to connect to your mysql database via the uploaded file. The technique is called "tunnelling".

    I realize this is an old thread, i just wanted to provide clarification because it seems like you didn't make the connection.

  11. #11
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ..or you can use an online tool, where you install only small proxy to facilitate communication between servers. Novaquantum makes one...


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
  •