My Database name is SPM
and I want to change it to spm
(small letters).
I tried using
RENAME DATABASE SPM TO spm;
There is no database command to do it. You basically have to do it outside the database. Below are some references outlining possible solutions. It has been answered pretty good in this question
This is probably what it should look like in your case
mysqladmin create spm
mysqldump SPM | mysql spm
After you have verified that everything is in order you can drop the original database.
drop database SPM
References Rename database 1 / Rename database 2
[Note on "RENAME DATABASE" command: This statement was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23.]