SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast codlib's Avatar
    Join Date
    Jan 2007
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Restoring SQL from multiple SQL files

    Hi

    I have a database backup with 400+ sql files. foreach table there is a separate sql file. Is it possible to import all this files together to a database? If so could you tell me how to do this?

    Also the backup is a gzipped tar file. Is there a way to restore from a compressed file.?

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    @codlib

    Do you still have access to the database holding these records? If so you can download MySQL Workbench and export the database as a single file, which you can then either import or execute as a script?

    Steve
    ictus==""

  3. #3
    SitePoint Member BadCoder's Avatar
    Join Date
    Jan 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this one:
    1. Go to Google, and type import mysql by ssh.
    2. Then use some tool rename file to sql1 to sql400.sql
    3. Write a loop on PHP or Perl to run that command import or just simple:
    open notepad, type the command:
    command sql1.sql
    command sql2.sql
    command sql3.sql

    then copy and paste it on your SSH , enter, they will run line by line for you automatic.

    Good luck,


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
  •