将数据导入 MySQL Workbench [英] Import data to MySQL Workbench
问题描述
我有一个包含 6 个表的数据库,我想将这些表导入 MySQL Workbench 中现有的数据库.
I have a database with 6 tables, and I want to import these tables to an existing database within MySQL Workbench.
我使用 phpMyAdmin 将数据库导出到一个 .sql
文件,然后使用数据导入/恢复"按钮将其导入到 MySQL Workbench,但没有任何反应(我不知道这个文件在哪里现在在 MySQL Workbench 中,我确实收到了导入成功消息,但是这个数据库到底去了哪里?).然后我尝试了一个 .CSV
文件,但它似乎不起作用,因为它还保存了整个数据库,而 MySQL Workbench 只需要单独的表(或者不是?)
I used phpMyAdmin to export the database to a .sql
file, and imported it to MySQL Workbench using "Data Import/Restore" button, but nothing happened(I don't know where this file is now in MySQL Workbench, I did get an import success message, but where exactly did this database go?). Then I tried a .CSV
file, but it doesn't seem to work because it also saved the entire database, and MySQL Workbench expects only separate tables(Or not?)
我是否必须分别创建每个表并将数据分别导入每个表?
Do I have to create each table separately and import data to each table individually?
或者,是否有更好的方法将数据库内容复制到 MySQL Workbench 中的现有数据库?
Or, there is a better way to copy database content to an existing database in MySQL Workbench?
谢谢
推荐答案
您可以使用 MySQL Workbench 导入到现有架构中.
You can use MySQL Workbench to import into an existing schema.
服务器 -> 数据导入 -> 从自包含文件导入 -> 默认目标架构
这篇关于将数据导入 MySQL Workbench的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!