The MySQL manual at MySQL covers this.
Usually I just dump the database and reimport it with a new name. This is not an option for very big databases. Apparently
Change to the database directory:
cd /var/lib/mysql/
Shut down MySQL... This is important!
/etc/init.d/mysql stop
Okay, this way doesn't work for InnoDB or BDB-Databases.
Rename database:
mv old-name new-name
...or the table...
cd database/
mv old-name.frm new-name.frm
mv old-name.MYD new-name.MYD
mv old-name.MYI new-name.MYI
Restart MySQL
/etc/init.d/mysql start
Done...
OK, this way doesn't work with InnoDB or BDB databases. In this case you have to dump the database and re-import it.