简体   繁体   中英

mysql: import schema without losing data

I have a database of about 15 tables which I restructured a bit (changed to innoDB, created Foreign Keys etc) using MySQL Workbench. I can extract the schema in sql format from the EER diagram but how can I import it in mySQL without losing my data?

Thanks in advance

mysql -uuser -ppassword dbname < schema.sql

但是不要忘记创建数据库dbname以及为用户user授予user

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