Changing the password

If you know the old one, do this in the XAMPP shell:

mysqladmin -u root -p password NEWPASSWORD

You'll be prompted for the old one (which is what the "-p" means.)

If the old one isn't working, use this page.  To "stop the mysql daemon process," use Task Manager.  (Just stopping it in XAMPP didn't work for me.)

In case the above page isn't available, here's my saved copy of it.

Moving databases between computers

To do this, back up on the old computer and restore on the other (below).

Backing up your database

See Nixon, Chapter 9, section on Backing up and restoring. 

You should probably change directory to some place other than XAMPP's home (!), by putting a command like this in the shell:

cd c:\Users\<your user name here>\Desktop

This** is the command you'll need to back up that database. 

mysqldump -u root -p -B --add-drop-database databaseName > databaseFile.sql

Note:  on Unix systems, capitalization matters, so I try to be consistent in case my web site is ever put onto Unix.  Be sure that "databaseName" has the same case as you used inside MySQL.  I added the "quotes" here because Unix required them -- DOS did not.

How do I restore?

mysql -u root -p < databaseFile.sql
**mysqldump -u root -p -B --add-drop-database databaseName > databaseFile.sql:

-B --add-drop-database means "add code to create the database if it doesn't already exist, and delete it and recreate it if it doesn't."  Or more succinctly:  "Don't argue with me about whether the database is already there; handle it!"