MySQL 如何使用 phpmyadmin 复制数据库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16481083/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I duplicate a database using phpmyadmin?
提问by Anis_Stack
I want to duplicate my database with phpmyadmin.
我想用 phpmyadmin 复制我的数据库。
How should I proceed?
我应该如何进行?
phpmyadmin Version: 3.4.5deb1
phpmyadmin 版本:3.4.5deb1
回答by Madhura Jayaratne
Go to the database you want to duplicate and click the Operations tab. In the Operations page under Copy database to
section enter the name of the new database and click Go
button.
转到要复制的数据库,然后单击“操作”选项卡。在操作页面Copy database to
部分下输入新数据库的名称并单击Go
按钮。
回答by Yogendra - eCommerce Developer
Login with phpmyadmin and then:
使用 phpmyadmin 登录,然后:
- Select your database that you want to duplicate.
- Find the 'Operations' tab as per below screenshot and click on that
- After selecting the tab you will see the 'Copy Database to:' section see screenshot.
- Enter the new database name where you want to copy the database
- Click on the Go button and wait.
- 选择要复制的数据库。
- 按照下面的屏幕截图找到“操作”选项卡,然后单击该选项卡
- 选择选项卡后,您将看到“将数据库复制到:”部分,请参见屏幕截图。
- 输入要复制数据库的新数据库名称
- 单击“开始”按钮并等待。
After the process completes, go and find the new database created with all the data.
该过程完成后,找到使用所有数据创建的新数据库。
回答by Anis_Stack
phpMyAdmin tool can be used to export and import databases up to a few MB in size, providing a simple way to duplicate a copy of a database using a different name on the servers.
phpMyAdmin 工具可用于导出和导入大小高达几 MB 的数据库,提供了一种在服务器上使用不同名称复制数据库副本的简单方法。
Exporting a copy of the database to your computer
将数据库的副本导出到您的计算机
- Login to the database that you want to duplicate using phpMyAdmin
- Click the database name on the left-hand side of the page. (Don't skip this step — if you continue to step 3 before doing this, you won't be able to reload the database under a new name later.)
- Select the Export tab
- Select the Save as file option
- Click Go
- 使用 phpMyAdmin 登录到要复制的数据库
- 单击页面左侧的数据库名称。(不要跳过这一步——如果在执行此操作之前继续执行第 3 步,以后将无法以新名称重新加载数据库。)
- 选择导出选项卡
- 选择另存为文件选项
- 点击前往
You'll then be prompted to save the database file on your personal computer.
然后系统会提示您将数据库文件保存在您的个人计算机上。
Importing the copy into a new database
将副本导入新数据库
You'll first need to create the new, empty database on the servers using the account control panel. After the new database has been created:
您首先需要使用帐户控制面板在服务器上创建新的空数据库。创建新数据库后:
- Login to the new database using phpMyAdmin
- Click the database name on the left-hand side of the page
- Select the Import tab
- Click the browse button under "File to Import", then select the database file from your computer
- Click Go to import the database
- List item
- 使用 phpMyAdmin 登录到新数据库
- 单击页面左侧的数据库名称
- 选择导入选项卡
- 单击“要导入的文件”下的浏览按钮,然后从您的计算机中选择数据库文件
- 单击 Go 导入数据库
- 项目清单
Hope this article would help you: http://support.tigertech.net/mysql-duplicate
希望这篇文章能帮到你:http: //support.tigertech.net/mysql-duplicate
回答by Borniet
Export the database from the "export" menu in PHPMyAdmin. Open the downloaded sql file with a texteditor (like notepad). Search and replace the file for all occurences of the databasename, and replace it by the new name. Save the file. Import the saved file via the "import" menu in PHPMyAdmin.
从 PHPMyAdmin 中的“导出”菜单导出数据库。使用文本编辑器(如记事本)打开下载的 sql 文件。搜索并替换所有出现的 databasename 文件,并将其替换为新名称。保存文件。通过 PHPMyAdmin 中的“导入”菜单导入保存的文件。
You now have your duplicated database.
您现在拥有重复的数据库。