Muskan Sharma
Muskan Sharma

Reputation: 1

Not able to access SQL in vs code using -u root -p

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

Upvotes: -3

Views: 35

Answers (2)

OldBoy
OldBoy

Reputation: 793

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.

Upvotes: 1

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

Do set the mysql path inside environment variable.

Upvotes: -1

Related Questions