MS SQL Server:
ALTER DATABASE "old_name" MODIFY NAME = "new_name"
MySQL:
While there used to exist a simple RENAME DATABASE
command in older versions of MySQL which was intended to perform this task, RENAME DATABASE
has since been removed from all newer versions to avoid security risks.
Your option is either to dump and reimport the database or to create a new one and move the tables.
There are other options for MySQL and other types too.
Please do a search.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…