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
Three options:
Create the new database, bring down the server, move the files from one database folder to the other, and restart the server. Note that this will only work if ALL of your tables are MyISAM.
Create the new database, use CREATE TABLE ... LIKE statements, and then use INSERT ... SELECT * FROM statements.
Use mysqldump and reload with that file.