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
Probably your mysql path is not set for the user and also for system.
Do set the mysql path inside environment variable.
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 propermysql
command:that should then ask you to enter the password. And, assuming the password is correct, the MySQL interactive shell should then start.