简体   繁体   中英

Import MySQL DB Schema

I have successfully used mysqldump to export a db schema without data. I now want to import this db schema.

I have tried a couple of methods but come across the error related to the < character.

Any ideas?

在此处输入图片说明

As the error shows, input redirection in PowerShell does not work with the < sign. You would do it using the Cmdlet Get-Content and use piping to put the output into the input of the command:

Get-Content v:\\mcsdb.sql | mysql -u root --sql --recreate-schema mcs

If you are interested in more in-depth info, refer to the Documentation .

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