0

i've been trying to add "mysql.exe -uroot -p" as an alias in powershell but everytime i save the file and start powershell it throws me this error.
i have included mysql in my environment path and it works fine on its own,
just that i dont wanna type a long command everytime i login.

mysqlRoot: The term 'mysql.exe -uroot -p' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

things ive tried so far in the powershell profile:

  • new-alias mysqlRoot "mysql.exe -uroot -p"
  • new-alias mysqlRoot mysql.exe -uroot -p [without quotes basically]
  • new-alias mysqlRoot "mysql -uroot -p"
  • copied the 'mysql -uroot -p' from the command line ,it worked fine.

please tell me what I'm doing wrong,definitely noob here so please go easy on me

0 Answers0