My Database name is SPM and I want to change it to spm (small letters).
I tried using
RENAME DATABASE SPM TO spm;
Use mysql_dump to dump out the database contents of the old schema (it produces SQL output, and can include all the object CREATE statements), switch to the new schema, and execute that script mysql> . dump.sql
If it's a large database, this may take a while, but it's the safest way to do it (make sure you suspend any applications using the database while the conversion process is going on).
Delete the old schema when you're satisfied that everything worked.