How to import large database?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Huether

    How to import large database?

    I saved my website databgase to my home computer. I am setting up a local
    version of the site, and need to import the database. I have mysql and
    everything set up. But when I try to run the sql script that I exported from
    my site's control panel, I get an out of memory error. What is the proper
    way to import this database? Do I need to increase some memory setting?

    -brian


  • Jamie Burns

    #2
    Re: How to import large database?

    how are you trying to import it? is it mysql that complains of errors?

    in theory, to export you would do something like:

    mysqldump -uroot -ppassword --opt db1 > db1.sql

    and to import you would do something like:

    mysql -uroot -ppassword db1 < db1.sql

    from the command line.

    "Brian Huether" <bhuetherNO@gui tarSP-dreams.AMcom> wrote in message
    news:S4Rgd.7577 0$CT6.19688@sam .nntpserver.com ...[color=blue]
    >I saved my website databgase to my home computer. I am setting up a local
    >version of the site, and need to import the database. I have mysql and
    >everything set up. But when I try to run the sql script that I exported
    >from my site's control panel, I get an out of memory error. What is the
    >proper way to import this database? Do I need to increase some memory
    >setting?
    >
    > -brian
    >[/color]


    Comment

    • steve

      #3
      Re: Re: How to import large database?

      "Jamie Burns2" wrote:[color=blue]
      > how are you trying to import it? is it mysql that complains of[/color]
      errors?[color=blue]
      >
      > in theory, to export you would do something like:
      >
      > mysqldump -uroot -ppassword --opt db1 > db1.sql
      >
      > and to import you would do something like:
      >
      > mysql -uroot -ppassword db1 < db1.sql
      >
      > from the command line.
      >
      > "Brian Huether" <bhuetherNO@gui tarSP-dreams.AMcom> wrote in
      > message
      > news:S4Rgd.7577 0$CT6.19688@sam .nntpserver.com ...[color=green]
      > >I saved my website databgase to my home computer. I am setting up[/color]
      > a local[color=green]
      > >version of the site, and need to import the database. I have mysql[/color]
      > and[color=green]
      > >everything set up. But when I try to run the sql script that I[/color]
      > exported[color=green]
      > >from my site’s control panel, I get an out of memory error.[/color]
      > What is the[color=green]
      > >proper way to import this database? Do I need to increase some[/color]
      > memory[color=green]
      > >setting?
      > >
      > > -brian
      > ></font>[/color][/color]

      The above is the best way, but there is also a brute force way, if all
      else fails. Zip the mysql data directory where your db resides, and
      unzip it into the new location. Make sure both dbs are offline when
      you this. 99% of the time it works just like that.. sometimes you
      have to repair some of the tables to make it all work.

      --
      http://www.dbForumz.com/ This article was posted by author's request
      Articles individually checked for conformance to usenet standards
      Topic URL: http://www.dbForumz.com/mySQL-import...ict165881.html
      Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=564042

      Comment

      Working...