Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005

    Unanswered: Import ONLY specific tables from a mysqldump


    How would I import only specific tables from a mysqldump I've done from another server? The database name I am importing to is "sgmail" and the tables I want to use are arp3_cam and arp3_bat.

    Thanks and God Bless!

    David Garza

  2. #2
    Join Date
    Sep 2003
    If you have a text file with the dump for ALL of the databases i do not believe there is a way to tell mysql not to import specific tables (that is, without restructuring the create/insert statements).

    I would just separate the file into smaller files (assuming you're on linux/bsd/etc).

    grep for the start of the create database statement for the one you want, then grep for the start of the next one, take those two line numbers and use head/tail (or something similar) to separate them out and put them into a new file, then import it.

Posting Permissions

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