Ubuntu Installation: the < operator is reserved for future use [duplicate]
Im trying to import a dumpfile.sql in the Windows Powershell with:
mysql -u root -p --database=database < Backup.sql
but i get the following error:
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
If i try to escape the "<"
mysql -u root -p --database=database ^< Backup.sql
I only get a list of all options.
Maybe the problem arose due to the update to Windows 11.
Solution 1:
Did you tried to pipie the backup file to the mysql
exe like this:
get-content 'Backup.sql' | mysql.exe -u root -p --database=database
another option to run it using cmd
from the powershell
& cmd /c "mysql.exe -u root -p --database=database < backup.sql"