It requires only 4 simple steps.
Steps to follow to rename a database in a Linux environment can be listed as follows.
- Stop mysql
- Use $ kill -9 [processID]
- Search the place where the database folders are stored
- Use $ mysqladmin variables | grep datadir
- Goto the folder which contains the database folders
- Rename the folder
- Use $ mv
- Use $ mv
- Start mysql
- Use $ mysqld_safe &
COMMENTS