SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello I have a few tables that I want to copy to a new database (on the same MySQL server). How can I copy the structure and data from that tables to the new database? I'm using phpMyAdmin.

    Thanks
    Guillermo

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In phpMyAdmin, on the page that shows all the tables in the database, there is an option under "View dump (schema) of database". Select the schema and data option and select go and save the output to file.

    Now you have a file with all the sql commands needed to create the schema (tables) and populate them with a copy of all the data that was in the database.

    So for your new database, in the section where you can execute SQL queries, select to execute the SQL from file and choose the file you saved before and- bingo - you have copied the database schema and data into your new database.

  3. #3
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great!
    Thanks for the help
    Guillermo


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
  •