Cannot alter schema name in MYSQL 5.5 w/ MYSQL Workbench
There is no RENAME available for schema names. You will have to export the schema, then import with a new database name.
This is a limitation of the MySQL server itself.
Actually, you can rename database name very easily,
- go to the top menu -> Database -> reverse engineering, select your database and keep go further until you get the er diagram of your database,
- after the there is an area called Catalog Area under that you can see your database name, right click on that and select edit schema. and change your database name
- now again go to the top menu -> database -> forward engineering and completed the database engineering using the wizard.
I can't imagine that anyone is still using version 5.5, but here is the procedure I followed in version 8. If you do have an older/newer version this may still work.
- Connect to the database.
- Open the Database menu and choose Migration Wizard.
- Start Migration.
- Both source and target will be the current MySQL server.
- Select the schema you want to rename.
- For Source Objects make sure all the tables are selected.
- Click Next and you will see a message that the source and target are the same.
- Now you should see a "Manual Editing" step.
- Under the Target Object column, click on the database name and change it.
- Now you can click next all the way through.
- Once finished you will have a newly renamed schema.
Currently my database has no indexes, stored procedures, etc. You will want to confirm all related objects are migrated as well before dropping the old database.