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
in phpmyadmin you can easily rename the database
select database goto operations tab in that rename Database to : type your new database name and click go
ask to drop old table and reload table data click OK in both
Your database is renamed