How to restore database with MySQL Console ?
Posted by: emdep3000 (---.3.132.226.ptr.us.xo.net)
Date: May 08, 2008 01:25AM

Hi all -

I have a huge database from website and want to load it on WAMP for the testing purpose. But I can't install the database thru PHP (since this database too big ~ = 2Gcool smiley

My question is: Is there a way to load it locally? Like MySQL Console or something like: mysql -u username -p password databasename < /path/to/databasebackup.sql.gz

If there is, please provide the syntax too. Thanks for your help in advance.

Emdep3000

Options: ReplyQuote
Re: How to restore database with MySQL Console ?
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: May 08, 2008 05:29AM

is it sql.gz? if it was th actual db files u could just place them in c:wamp/mysql/mysql5.045/data but in the format u have it needs to be done the slow way

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 05/08/2008 05:46PM by stevenmartin99.

Options: ReplyQuote
Re: How to restore database with MySQL Console ?
Posted by: rady (---.tx.res.rr.com)
Date: January 06, 2010 04:27AM

I seem to be terminally dense: I can't restore a large (6M) database with the console. I keep getting syntax error messages and haven't the slightest idea what is required - my SQL reference text, the online SQL instructions - all say the same: mysql -u user -ppassword -D target_db < source_db.sql

I have tried every combination of user and password I can think of: eg, root, root@localhost - -

I have created the target db as 'riis'

The backup is (no kidding) maindrupalrriis.sql which I have put into C:\wamp\bin\mysql\mysql5.1.30\bin\

Is there a generous soul out there in cyberland that will help me with the EXACT syntax?

Thanks in advance,

Options: ReplyQuote
Re: How to restore database with MySQL Console ?
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: January 06, 2010 07:50AM

add me to msn and il help you

stevenmartin99@hotmail.com

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.