我尝试使用以下命令在 Windows Powershell 中导入 dumpfile.sql:
mysql -u root -p --database=database < Backup.sql
但我收到以下错误:
At <script-path>:1 char:34
+ mysql -u root -p --database=database < Backup.sql
+ ~
The '<' operator is reserved for future use..
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RedirectionNotSupported
如果我试图逃避“
mysql -u root -p --database=database ^< Backup.sql
我只得到所有选项的列表。
该问题可能是由于 Windows 11 的更新引起的。
您是否尝试将备份文件pipie到mysql
exe这样的:
get-content 'Backup.sql' | mysql.exe -u root -p --database=database
使用另一个选项来运行它cmd
从 powershell
& cmd /c "mysql.exe -u root -p --database=database < backup.sql"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)