
From phpMyAdmin, select the database you want to select. In the tabs there’s one called Operations, go to the rename section. That’s all.
It does, as many suggested, create a new database with the new name, dump all tables of the old database into the new database and drop the old database.
Other method:
- Create a new database
- Create the rename queries with:
SELECT CONCAT('RENAME TABLE ',table_schema,'.',table_name, ' TO ','new_schema.',table_name,';') FROM information_schema.TABLES WHERE table_schema LIKE 'old_schema'; - Run that output
- Delete old database