重命名MySQL数据库 [英] Rename MySQL database
本文介绍了重命名MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个名为 hrms
的数据库。现在我需要将数据库名称更改为 sunhrm
。但是,它在MySQL工作台中禁用。我可以在Linux服务器本身上这样做吗?
I created a database with the name of hrms
. Now I need to change database name to sunhrm
. But, It is disabled in MySQL workbench. Can I do that on the Linux server itself?
推荐答案
我不认为你可以这样做。我想你需要转储该数据库,创建新命名的,然后导入转储。
I don't think you can do this. I think you'll need to dump that database, create the newly named one and then import the dump.
如果这是实时系统,您需要将其删除。
If this is a live system you'll need to take it down. If you cannot, then you will need to setup replication from this database to the new one.
如果您想要查看命令,请执行此操作, @jan具有详细信息。
If you want to see the commands to do this, @jan has the details.
这篇关于重命名MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文