Reputation:
I have a database with 6 tables, and I want to import these tables to an existing database within 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?
Or, there is a better way to copy database content to an existing database in MySQL Workbench?
Thanks
Upvotes: 4
Views: 10762
Reputation: 471
Upvotes: 1
Reputation: 159
while exporting your phpmyadmin database use the Custom - display all possible options
Upvotes: 0
Reputation: 4754
You can use MySQL Workbench to import into an existing schema.
Server -> Data Import -> Import from self-contained file -> Default Target Schema
Upvotes: 8