如何重命名 MySQL 模式?
MySQL 是否有重命名 schema 的语句?我知道 RENAME {DATABASE | SCHEMA} db_name TO new_db_name;
,但是该语句“被发现是危险的,并在 MySQL 5.1.23 中被删除”(正如他们在 此处)。
我也尝试使用 MySQL Workbench 来做到这一点。我尝试右键单击架构,然后更改架构。但他们不让你在那里改名字。
那么人们如何重命名数据库呢?
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).
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在“模型概述”页面上,您会看到一个包含架构的选项卡。如果右键单击该选项卡,您将获得“编辑架构”选项。从那里,您可以通过添加新名称来重命名架构,然后单击字段外部。这适用于 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
Edit: On the model overview it's under Physical Schemata
Screenshot: