470,818 Members | 1,604 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,818 developers. It's quick & easy.

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
Jul 20 '05 #1
2 9020
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" <bh********@guitarSP-dreams.AMcom> wrote in message
news:S4*******************@sam.nntpserver.com...
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

Jul 20 '05 #2
"Jamie Burns2" wrote:
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" <bh********@guitarSP-dreams.AMcom> wrote in
message
news:S4*******************@sam.nntpserver.com...
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
</font>


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
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.