Guest User

Untitled

a guest
Jul 27th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. mysql -uroot -pYourPassword -e "source C:tempfilename.SQL"
  2.  
  3. mysql --user=root --password=YourPassword --execute="source C:tempfilename.SQL"
  4.  
  5. get-content filename.sql -readcount 1000 |% {$_ | mysql -uroot database}
  6.  
  7. $reader = [IO.File]::OpenText($filetoread)
  8. while ($reader.Peek() -ge 0) {
  9. $line = $reader.ReadLine()
  10.  
  11. #do your thing here
  12.  
  13. }
  14. $reader.Close()
  15.  
  16. Get-Content .buTable.sql | mysql -uuser -ppassword destDatabase
Add Comment
Please, Sign In to add comment