简体   繁体   中英

Import data from mysql dump into MySql Workbench

I have an old MySql dump file (xyz.sql) that I want to import to a model in MySql Workbench.

I was able to do a Reverse Engineering of the file which created the schema and all the tables. Unfortunately it didn't import the data which is important.

So all tables are empty under the "Inserts" tab.

How can I import the data from the file into the tables or import the complete file schema + data in 1 step.

I use MySql Workbench 8.0.27

Thanks

From https://findanyanswer.com/how-do-i-import-a-sql-file-into-mysql-workbench

  1. Click Data Import / Restore.
  2. Select Import from Self-Contained File.
  3. Click … and locate your .sql file.
  4. Under Default Target Schema select the database where you want this import to go.
  5. Click Start Import.

or

Import data into table using mysql -u username -p databasename < path/example.sql

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM