Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysqldump not working!! need help ASAP 1

Status
Not open for further replies.

JoshChang

Programmer
Jan 5, 2007
2
US
Hi guys,
it's my first post here, so don't be too mean; I already know that I suck at this.

I am running MySQL 5.0 on winXPpro and need to move the database over to another machine with the same set up.

I tried:

mysql> mysqldump --opt cs > backup-cs.sql;

and

mysql> mysqldump --user=root --password=cmu cs > backup-cs.sql;

and

mysql> mysqldump --user root --password=cmu cs > backup-cs.sql;

as some websites instructed me to.
the name of the db is cs(stands for customer service) and at the time the mysql was connected and cs was chosen by mysql> use cs; .

Why is this not working. I really need some help, thx.
 
I have never used mysqldump before ... but this might help get to the end goal.

If the tables are in the myISAM engine you can just copy the .frm, .myi and .myd files from the /mysql/data/<database>/ directory to the new server, stop and start mySQL on the second server and you're good to go.
 
Oops .. to clarify what I just wrote ... move the .frm, .myi and .myd files for the table(s) you are trying to move.
 
How do I check if my tables are in myISAM engine?

thx
 
[blue]mysqldump[/blue] is supposed to be run not from the mysql prompt, but from the normal command prompt.

Code:
C:\mysql_dir\bin\> mysqldump .....

Try it from there.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
also note you don't use an = for either the user or password.

as said run it from your command prompt or shell (depending on your OS of course)

mysqldump -uusername -ppassword databasename > outputfilename
 
Without vacunita's advice I never would have gotten mysqldump to work. It distresses me that such a basic instruction isn't included with most directions for the command. Now my attempt to import the .sql file (using phpMyAdmin on an ISP) is having a permissions problem. So frustrated. Thanks for letting me vent and THANKS vacunita!

[purple]If we knew what it was we were doing, it would not be called
research [blue]database development[/blue], would it? [tab]-- Albert Einstein[/purple]​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top