How can I import data into mysql database via mysql workbench?

后端 未结 3 397
梦毁少年i
梦毁少年i 2020-12-23 16:26

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

3条回答
  •  北海茫月
    2020-12-23 17:12

    • 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.

    Hope it helps.

    ---Edited answer---

    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).

提交回复
热议问题