skip to Main Content

I am trying to access SQL using-u root -p but I am not able to and this is what it’s showing
-u root -p

This is what I am getting

-u root -p

-u : The term ‘-u’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

  • -u root -p

  • ~~

    • CategoryInfo : ObjectNotFound: (-u:String) [], CommandNotFoundException

    • FullyQualifiedErrorId : CommandNotFoundException

2

Answers


  1. Probably your mysql path is not set for the user and also for system.

    Do set the mysql path inside environment variable.

    Login or Signup to reply.
  2. The -u root -p is not recognised by Powershell as it has no meaning. They are the parameters to the command that you need to run to start the interactive MySQL session. You need to use the proper mysql command:

    mysql -u root -p
    

    that should then ask you to enter the password. And, assuming the password is correct, the MySQL interactive shell should then start.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search