http://www.pantz.org/software/mysql/mysqlcommands.html
Dump one database for backup.
Code:
# [mysql dir]/bin/mysqldump -u username -ppassword --databases databasename >/tmp/databasename.sql
to put in english, let's say you want to save the sql dump in /home/sylaei/bob.sql and your DB is named bob, and you use the username/pass of sylaei/uber" :
mysqldump -u sylaei -puber --databases bob > /home/sylaei/bob.sql
You may not need the mysqldir/bin/ part assuming your path is properly added.
Restore database (or database table) from backup.
Code:
# [mysql dir]/bin/mysql -u username -ppassword databasename < /tmp/databasename.sql
This works in windows too, though I normally just windows key + r cmd, cd\<dirofsqlfile>, mysql -u username -p <press enter>
type in password, then "use dbname;" then "source <sqlfilenmae>".
Assuming you save it to uhh, c:\bob.sql, here's another example with same sort of syntax, assuming you added sylaei on this account with permissions to make a db etc.:
start up command line.
Before doing this I'd open up your bob.sql in a smart editor to make sure the first line doesn't "create database bob;" I forget if a dump will recreate your db's or not, I don't think it does though!
c:\
cd\
mysql -u sylaei -p
uber
create database bob;
use bob;
source bob.sql
That would take your copy of bob.sql and make it on your new box.
Make sure when you installed MySQL on Windows you had the option of adding a PATH directory, as without it you can't run mysql from any dir.
I don't mess with phpmyadmin and other tools so much, they're nice for optimization and quick overview but for backup/restore the mysql CLI is pretty sexy and simple.
That's all off memory, so yeah. Hope it helps!