Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'<' operator is reserved PowerShell Error

I am trying to use mysql -u root -p Tutorials < tut_backup.sql in PowerShell to restore a table in a MySQL DB but it's giving me The '<' operator is reserved for future use. error. Is there a roundabout way?

like image 344
Concerned_Citizen Avatar asked Apr 02 '13 23:04

Concerned_Citizen


2 Answers

How about

& cmd.exe /c "mysql -u root -p Tutorials < tut_backup.sql" 
like image 93
Jackie Avatar answered Oct 29 '22 06:10

Jackie


You can pipe in the contents like so:

Get-Content tut_backup.sql | mysql -u root -p Tutorials
like image 17
Dean Or Avatar answered Oct 29 '22 05:10

Dean Or