如何重命名MySQL模式? [英] How do I rename a MySQL schema?
问题描述
可能重复:
如何重命名MySQL中的模式
有重命名模式的MySQL语句吗?我知道 RENAME {DATABASE | SCHEMA} db_name TO new_db_name;
,但是该语句被发现是危险的,并在MySQL 5.1.23中删除(如此处)。
Is there a MySQL statement for renaming a schema? I know about RENAME {DATABASE | SCHEMA} db_name TO new_db_name;
, but that statement "was found to be dangerous and was removed in MySQL 5.1.23" (as they mention in here).
它使用MySQL Workbench。我试图右键单击模式,然后alter模式。
I was also trying to do it using MySQL Workbench. I tried right clicking on the schema, and then alter schema. But they don't let you change its name in there.
那么,人们如何重命名数据库?
So how do people rename databases?
推荐答案
如果你在模型概述页面,你会得到一个带有模式的选项卡。如果您右键单击该选项卡,您将获得编辑模式的选项。从中可以通过添加新名称来重命名模式,然后在字段外单击。这适用于MySQL Workbench 5.2.30 CE
If you're on the Model Overview page you get a tab with the schema. If you rightclick on that tab you get an option to "edit schema". From there you can rename the schema by adding a new name, then click outside the field. This goes for MySQL Workbench 5.2.30 CE
编辑:在模型概述中,它位于物理模式
On the model overview it's under Physical Schemata
:
>
这篇关于如何重命名MySQL模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!