【问题标题】:'<' operator is reserved PowerShell Error'<' 运算符被保留 PowerShell 错误
【发布时间】:2013-04-02 23:49:33
【问题描述】:

我试图在 PowerShell 中使用 mysql -u root -p Tutorials &lt; tut_backup.sql 来恢复 MySQL 数据库中的表,但它给了我 The '&lt;' operator is reserved for future use. 错误。有迂回的方法吗?

【问题讨论】:

标签: mysql powershell


【解决方案1】:

怎么样

 & cmd.exe /c "mysql -u root -p Tutorials < tut_backup.sql" 

【讨论】:

    【解决方案2】:

    你可以像这样输入内容:

    Get-Content tut_backup.sql | mysql -u root -p Tutorials
    

    【讨论】:

    • 这救了我。只是发表评论,因为这个答案多次帮助了我。
    【解决方案3】:

    试试这个:

    mysql -u root -p
    (prompts for password)
    source tut_backup.sql
    

    归功于wallyk。

    【讨论】:

      猜你喜欢
      • 2020-06-16
      • 2022-12-21
      • 1970-01-01
      • 2014-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-31
      • 1970-01-01
      相关资源
      最近更新 更多