View previous topic :: View next topic |
Author |
Message |
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Sat Aug 21, 2004 6:59 pm Post subject: Importing data to MySQL |
|
|
Scenario: Moving to a new web host with a limited amount of space (50 megs).
My database dump file is 48 megs. It's too big for me to upload; I get a Quota Exceeded error.
Zipped, the database is 11 megs and my web host doesn't count DB space against my total space used.
What I need to learn is how to insert the data from the sqldump.zip file into the database without unzipping the file to disk. I'm not quite sure how this should be done. I've got a couple ideas, but none seem to be panning out.
mysql uUSERNAME p NEWDBNAME < `unzip sqldump.zip`
I've been trying different things like this, but my scripting skills suck. I need a push in the right direction. _________________ http://get.a.clue.de |
|
Back to top |
|
|
dcoyaz n00b
Joined: 09 Mar 2004 Posts: 10 Location: Arizona
|
Posted: Sat Aug 21, 2004 7:35 pm Post subject: |
|
|
using gzip you could do the following, i think unzip has a pipe output as well but i haven't tried.
gzip -c -d yourzipfile | mysql -u root -p databasename
hth,
general disclaimors |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
|
Back to top |
|
|
|