如何通过mysql工作台将数据导入mysql数据库? [英] How can I import data into mysql database via mysql workbench?

查看:152
本文介绍了如何通过mysql工作台将数据导入mysql数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在mysql中创建了一个数据库.我有一个.sql文件.如何通过mysql工作台将其导入数据库?

I created a database in mysql. I have a .sql file. how can i import it into my database via mysql workbench ?

推荐答案

    在主窗口的
  • 服务器管理下,选择要将数据库还原到的服务器实例(如果是首次创建,请创建新服务器实例).
  • 点击管理导入/导出
  • 点击屏幕左侧的数据导入/还原.
  • 选择从自包含文件导入单选按钮(屏幕右侧)
  • 选择.sql的路径
  • 点击窗口右下角的开始导入按钮.
    • Under Server Administration on the Home window select the server instance you want to restore database to (Create New Server Instance if doing it first time).
    • Click on Manage Import/Export
    • Click on Data Import/Restore on the left side of the screen.
    • Select Import from Self-Contained File radio button (right side of screen)
    • Select the path of .sql
    • Click Start Import button at the right bottom corner of window.
    • 希望有帮助.

      ---编辑的答案---

      ---Edited answer---

      关于模式的选择. MySQL Workbench(5.2.47 CE Rev1039)尚不支持导出到用户定义的架构.它将仅创建导出了.sql的架构.在5.2.47中,我们看到新建"目标架构.但这是行不通的.我使用MySQL Administrator(Oracle Oracle MySQL之前的旧版本)进行备份/还原. 您仍然可以从Googled可信来源下载它(搜索MySQL Administrator 1.2.17).

      Regarding selection of the schema. MySQL Workbench (5.2.47 CE Rev1039) does not yet support exporting to the user defined schema. It will create only the schema for which you exported the .sql... In 5.2.47 we see "New" target schema. But it does not work. I use MySQL Administrator (the old pre-Oracle MySQL Admin beauty) for my work for backup/restore. You can still download it from Googled trustable sources (search MySQL Administrator 1.2.17).

      这篇关于如何通过mysql工作台将数据导入mysql数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆