MYSQLDUMP

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

MYSQLDUMP

Post by pinehead18 »

I have a backup from another server with all the tables etc for a db.

I created the db pinehead

and i want to take this text file and dump it so it creates all the tables etc inside of pinehead

I'm using mysql_dump -upinehead -p pinehead dump.db

But it doesn't work.

Suggestions?

Thanks guys
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: MYSQLDUMP

Post by volka »

pinehead18 wrote:But it doesn't work.
Do you get something like an error message? Anything?
"it doesn't work." usually isn't the "whole story" ;)
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

I don't think the sytax is right cause it says dump.db not correct table name.

Is it the right syntax?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

pinehead18 wrote:I don't think the sytax is right cause it says dump.db not correct table name.

Is it the right syntax?
Have you looked online to see if it's the right syntax? There's bound to be quite a few self-proclaimed experts with it on their websites.
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Post by facets »

I use the following to import into my db.

mysql -u'name' -p database_to_recover < database_backup.sql (this will prompt for a password) (-p'password' should work too)

I assume the database names are the same?

will.
Post Reply