如何重命名 MySQL 模式?

发布于 2024-10-09 06:56:50 字数 346 浏览 1 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

能否归途做我良人 2024-10-16 06:56:50

如果您在“模型概述”页面上,您会看到一个包含架构的选项卡。如果右键单击该选项卡,您将获得“编辑架构”选项。从那里,您可以通过添加新名称来重命名架构,然后单击字段外部。这适用于 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:

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文